How to assign a hyperlink to a button on a form?

B

Bremser

I'm creating an order form and want to place buttons next to products that,
when clicked, take the user to a web page describing the product. I've found
a button icon on the "Forms" toolbar, but I'm not adept at VB programming and
I can't figure out how to attach or associate a hyperlink to a button. Any
advice would be appreciated!

Thanks,

Bremser
 
G

Gary''s Student

First create a Forms button
Next create a macro like:

Sub dural()
ActiveWorkbook.FollowHyperlink Address:="http://www.cnn.com"
End Sub

Last right-click the button and assign the macro.
 

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