Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
put a hyperlink on a command button Lloyd Excel Worksheet Functions 1 May 21st 07 01:27 PM
Command Button Hyperlink jgarner Excel Discussion (Misc queries) 2 April 27th 07 02:12 PM
How do I execute command from button or hyperlink? rerhart Excel Discussion (Misc queries) 1 February 18th 05 09:41 PM
Command Button vs Control Button RGibson Excel Programming 1 October 14th 03 02:24 AM
Command Button vs Form Button T K Excel Programming 4 August 26th 03 07:26 PM


All times are GMT +1. The time now is 09:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"