Run Hyperlink by forms button

C

Corey

I used the macro recorder to record a hyperlink and the result was :
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="BSL%20PK/POST%20Project%20Reports"

How can i have it run by a form button rather than adding the Hyperlink to the cell, then having to
click on the cell for it to run ?
 
C

Chip Pearson

Try something like the following in the Click event of a Command Button on a
form:

ThisWorkbook.FollowHyperlink "http://whatever"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 
C

Corey

thanks Chip.

Perfect

Try something like the following in the Click event of a Command Button on a
form:

ThisWorkbook.FollowHyperlink "http://whatever"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 

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