How do I create a hyperlink from a button on a worksheet?

I

Ian R

Is it possible to assign a hyperlink (to a web page) to a button on the
worksheet?

I added a command button to a sheet but found there's no provision to add a
web link and I'm not sure sure what syntax to use for a macro.

Thanks for any info.

Ian
 
J

jeff

Hi, Ian,

right click on your button, select view code,

paste this:

Private Sub CommandButton1_Click()
ActiveWorkbook.FollowHyperlink
Address:="http://microsoft.com", NewWindow:=True
End Sub

(lines 2 & 3 are really on one line)

jeff
 
I

Ian R

Jeff

You're a star

Thanks for replying so quickly. I'm very grateful to you.

Ian I^)
 
Top