Results 1 to 2 of 2

Thread: Button with link url based on cell
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    May 2019
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Button with link url based on cell

    Hello. I am trying to figure out a way to have a single button send the user to google based on the content of a cell.

    For example. If F1 has JANE DOE... then once the button is pushed it would send the user to google and JANE DOE would already be in the search.

    I would think a simple google string as such (https://www.google.com/search?q=jane+doe) would suffice. Is this possible?


    Thanks!

  2. #2
    Board Regular
    Join Date
    Jul 2009
    Posts
    1,668
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    4 Thread(s)

    Default Re: Button with link url based on cell

    Hi,

    Here's one method with very basic code.

    This relies on the user selecting the cell with the search term/name in then pressing the button to which this macro is assigned.

    Code:
    Sub Make_hyperlink()
    
    
    bLink = "https://www.google.com/search?q="
    uLink = ActiveCell.Value
    
    hLink = bLink & uLink
    
    
    ThisWorkbook.FollowHyperlink (hLink)
    
    End Sub

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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