ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run Hyperlink by forms button (https://www.excelbanter.com/excel-programming/396814-run-hyperlink-forms-button.html)

Corey

Run Hyperlink by forms button
 
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 ?



Chip Pearson

Run Hyperlink by forms button
 
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)

"Corey" wrote in message
...
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 ?




Corey

Run Hyperlink by forms button
 
thanks Chip.

Perfect

"Chip Pearson" wrote in message
...
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)

"Corey" wrote in message
...
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 ?






All times are GMT +1. The time now is 10:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com