Dynamic hyperlink tied to a button in Excel

mikeolson

New Member
Joined
Oct 22, 2018
Messages
7
I want a concat'd hyperlink tied to a button, that when clicked, goes to a website, which would be the dynamic input of what the user entered into a cell added to the end of a static website address I have in another cell. I'm using this function to search a website that puts the user input at the end of a search url. Can someone help me? I know how to make automatic hyperlinks between two cells with if and concat and the hyperlink function. I just don't know how to attach them to a button, and make it so the user input dictates the url that's visited when the button is clicked.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Create the button in Developer, assign a macro to it:

1580929025758.png
1580929116549.png


Working example, concatenating the fixed https and a variable, in this case, search text to add to a google search:
1580928959348.png


VBA Code:
Sub Button1_Click()
    ThisWorkbook.FollowHyperlink (Cells(1, 2).Value & Cells(2, 2).Value)
End Sub

In action:
1123100.gif
 
Upvote 0

Forum statistics

Threads
1,215,443
Messages
6,124,889
Members
449,193
Latest member
ronnyf85

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top