Opening a Google map from address in a form

P

Paul

Is there a way to open a Google map using an address string in a form?

Thanks in advance,

Paul
 
M

Mr. B

Hi, Paul.

Yes, you can open a Google map usisng a address string from a form.

You can use the followin code in the After Update event of a command button:

Dim strAddress As String
'read the Address and assign it to a string type variable
strAddress = Me.txtAddress
Application.FollowHyperlink "http://maps.google.co.uk/maps?f=q&hl=en&q=" _
& strAddress & ""

You will need to change the "Me.txtAddress" to the name of the control (text
box) that has the address that you want to display on a Google map.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top