+ Reply to Thread
Results 1 to 5 of 5

Use a CommandButton Control for a Google Maps Hyperlink with Cell Data

  1. #1
    Registered User
    Join Date
    02-08-2013
    Location
    Taunton, Somerset, UK
    MS-Off Ver
    Excel 2007
    Posts
    85

    Use a CommandButton Control for a Google Maps Hyperlink with Cell Data

    Hi Board of Genius'

    Can anybody help me to achieve this, at all, please?

    I currently have a Hyperlink Cell (C10) which, when clicked, takes the user externally to Google maps at the address as inputted into a number of Cells:

    User Cells:
    B6 = "House Name / Number"
    B7 = "Street"
    B8 = "Town"
    B9 = "County"
    B10 = "Post Code"

    The Hyperlink formula I have in C10 is:
    Please Login or Register  to view this content.
    This works fine, but I really want this to be assigned to a CommandButton Control, but just cannot figure out how to get it to work.
    I played around with:
    Please Login or Register  to view this content.
    But Google seems to search for the +'s instead of the text - any ideas?


    Thanks In advance.

    Kind Regards
    =IF(Richard="Gets Help",Richard=,Richard=Keh?)

  2. #2
    Registered User
    Join Date
    02-08-2013
    Location
    Taunton, Somerset, UK
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: Use a CommandButton Control for a Google Maps Hyperlink with Cell Data

    A Hundred views, but no replies?... Does this mean this can't be done?...

  3. #3
    Registered User
    Join Date
    12-03-2013
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Use a CommandButton Control for a Google Maps Hyperlink with Cell Data

    Try below. Set up your string using CONCATENATE

    =CONCATENATE($B$6,"+",$B$7,"+",$B$8,"+",$B$9,"+",$B$10) - I set this to cell B12. That way you can assign the below. It's not fancy, but it does work.

    Sub gotit()
    ActiveWorkbook.FollowHyperlink "https://maps.google.com/maps?q=" & Range("b12").Value
    End Sub

  4. #4
    Registered User
    Join Date
    02-08-2013
    Location
    Taunton, Somerset, UK
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: Use a CommandButton Control for a Google Maps Hyperlink with Cell Data

    Quote Originally Posted by bodnarj View Post
    Try below. Set up your string using CONCATENATE

    =CONCATENATE($B$6,"+",$B$7,"+",$B$8,"+",$B$9,"+",$B$10) - I set this to cell B12. That way you can assign the below. It's not fancy, but it does work.

    Sub gotit()
    ActiveWorkbook.FollowHyperlink "https://maps.google.com/maps?q=" & Range("b12").Value
    End Sub
    Bang on, my friend, thank you.

    The only thing I changed was just to keep the "Private Sub CommandButton1_Click()" event as opposed to the "Sub gotit()" Event, which I have no idea what it is, and it wasn't working, anyway.

    Sorted, Thanks!

  5. #5
    Registered User
    Join Date
    07-17-2017
    Location
    MALAYSIA
    MS-Off Ver
    2010
    Posts
    4

    Re: Use a CommandButton Control for a Google Maps Hyperlink with Cell Data

    Private Sub CommandButton1_Click()

    ActiveWorkbook.FollowHyperlink Address:="http://maps.google.com/maps?q=" & Range("B6,B7,B8,B9,B10").Value

    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Importing data from Google maps into my spreadsheet
    By cozzy in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 10-14-2013, 09:05 AM
  2. Broken Formula to Hyperlink longitude and latitude cells to google maps
    By Nola ADA in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2013, 09:48 AM
  3. hyperlink for google maps
    By [email protected] in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-06-2013, 05:48 PM
  4. add hyperlink to field for google maps
    By [email protected] in forum Access Tables & Databases
    Replies: 2
    Last Post: 11-22-2011, 02:58 PM
  5. google maps hyperlink for access
    By [email protected] in forum Access Tables & Databases
    Replies: 1
    Last Post: 10-18-2011, 10:10 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1