qpgraphics4
03-18-2008, 11:41 AM
I imported a list of customers from excel and I would like to automate an individual map for each customer showing directions to our store. I know how to get directions manually, but I am working with several customers, so doing this manually would take a long time. Any help would be appreciated.
Wilfried
03-19-2008, 09:30 AM
Hi,
You can automate this if you do some custom programming. Do you have programming skills?
qpgraphics4
03-19-2008, 12:57 PM
I have some programming skills, but it has been a few years since i have actually programmed. I am currently trying to refresh my mind with VisualBasic. Is there any code that is already written that I can use?
Eric Frost
03-19-2008, 03:25 PM
There are some examples to get started at
Working With Excel and MapPoint - MP2K Magazine (http://www.mp2kmag.com/excel/)
I find it easy to code up ad hoc stuff in Excel VBA, that's probably my favorite "development platform" for MapPoint, for general work anyway..
Eric
qpgraphics4
04-30-2008, 04:23 PM
I am trying to get the distance for each customer to a master location. Some address are returning the correct # of miles, and some address are returning a time (12:00 AM). This is the code I am using:
Dim dDistance As Double
dDistance = Math.Round(oRoute.Distance, 1)
How can I get the correct number of miles for the addresses that are returning 12:00 AM?
p.s. I am programming in VBA using MapPoint 2006
Wilfried
05-01-2008, 03:28 AM
Hi,
The Distance property of a Route object will return always the distance or 0 is it is not (or can not) calculated. But wy do you think that the value it return is a time?
qpgraphics4
05-01-2008, 08:40 AM
I was hoping you could tell me why it could be returning a time instead of the number of miles. i'm stumped
here is a screen shot of some code and the values i am getting.
file:///C:/DOCUME%7E1/ADMINI%7E1/LOCALS%7E1/Temp/moz-screenshot.jpg
Wilfried
05-01-2008, 12:27 PM
Hi,
Ok now I see what you mean. 1 thing we should be very clear. The Distance value is a floating point value representing the distance in miles or kilometers. It is not a time value.
However a time value is also just a floating point value. Thus for some weird reason it is displayed as a time value in your Excel.
Your code looks ok but I don't know anything of Excel. If someone can jump in here? There must be a way to tell Excel it is not a time value but just a floating point number to display.