View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
neowok[_70_] neowok[_70_] is offline
external usenet poster
 
Posts: 1
Default setting a command button to be a hyperlink

I want to have a command button act basically as a hyperlink, click th
button and it goes to a url specified in code. what i dont know i
what code will do it.

I have come up with

Private Sub CommandButton6_Click()
Dim h As Hyperlink
Set h = ActiveSheet.Hyperlinks.Add(ActiveCell, "http://www.msn.com")
h.Follow
h.Delete
ActiveCell.Clear
End Sub

the problem with this is because its writing and deleting from cells
it will prompt when you close the workbook every time a button on th
page has been clicked. I need a way of setting the hyperlink for tha
button without doing anything that would cause excel to think the shee
has been changed.

thank

--
Message posted from http://www.ExcelForum.com