Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlinking google maps to access form button

Status
Not open for further replies.

ssraheem

Technical User
Sep 8, 2009
1
US
thread705-1456146
I keep getting a User-defined type not defined error when I compile this at line: DIM ie As New InternetExplorer
 
Have you checked a project library reference to IE?

Cogito eggo sum – I think, therefore I am a waffle.
 
Do you need to control Internet Explorer for some reason, or else can you just use:

Code:
Application.FollowHyperlink "[URL unfurl="true"]http://www.mywebsite.com"[/URL]

Unless you need to control Internet Explorer, or you have a reason to believe it wouldn't be the default browser, but this needs to open in IE, then that'd be a simpler approach, I would think.

--

"If to err is human, then I must be some kind of human!" -Me
 
This opens Google maps in internet explorer at an address location. You may need to determin the location of internet explorer
Code:
Dim Street As String ' full or part address like 1600 Pennsylvania Ave NW, Washington, DC?
Dim mev1 As String
mev1 = "C:\Program Files\internet explorer\iexplore " & "[URL unfurl="true"]http://maps.google.com/maps?saddr="[/URL] & Street
Call Shell(mev1, vbMaximizedFocus)


or this for directions

Code:
Dim mev1 As String
Dim mfrom As String
Dim mto As String

mfrom = "saddr= <Address>" ' from Address (full or part address like 1600 Pennsylvania Ave NW, Washington, DC?)
mto = "daddr=  <Address> " ' to address 
mev1 = "C:\Program Files\internet explorer\iexplore " & "[URL unfurl="true"]http://maps.google.com/maps?"[/URL] & mfrom & "&" & mto
Call Shell(mev1, vbMaximizedFocus)

Hope these are useful
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top