> very complex ... very complex ...
Which bit is complex? Putting a control on a form |(and if this IS hard for you then I take back my advice about using the Bing Maps control as it is substantially harder to use)? Navigating to a URL for that control? Figuring out the necessary query?
The Bing REST API (which is what you use to create the query)is fully documented and I have previously linked you to it in thread222-1803165). This is a VB forum, not a Bing REST API forum, so we're not likely to provide much advice to you on that, particularly when you can read the documentation
B ut, as a pointer, here's building the relevant REST API call to display the relevant 640x480px map for both the zipcosde and a long/lat
Andy has already explained how to make the webbrowser control available in the IDE's toolbox. You need, as I advised, to drop one of them (just like you dropped the shape control) onto your form. Size it to 640 by 480 pixels if you like
Add two command buttons, rename them as cmdZips and d cmdLongLat. Then copy and paste the following code into your form:
Code:
[blue]Private Sub cmdZips_Click()
Dim wp0 As String
Dim wp1 As String
wp0 = "Naples,80100"
wp1 = "Rome,00100"
WebBrowser1.Navigate "[URL unfurl="true"]http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/Routes?wp.0="[/URL] & wp0 & "&wp.1=" & wp1 & "&mapsize=640,480&key=<your bing key>"
End Sub
Private Sub cmdLongLat_Click()
Dim wp0 As String
Dim wp1 As String
wp0 = "40.8522,14.2681"
wp1 = "41.8919,12.5113"
WebBrowser1.Navigate "[URL unfurl="true"]http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/Routes?wp.0="[/URL] & wp0 & "&wp.1=" & wp1 & "&mapsize=640,480&key=<your bing key>"
End Sub
[/blue]
And the below is what all that massive amount of code produces, with start and end points and the route shown:
Oh, and the reason that you got an error with .fill in your OP is that that is not something supported by VB's shape controls. It exists in some shape classes in some VBA hosts (e.g. Excel)