Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default Hyperlink with an active x control button

I have an active x control button called Sub Button12_Click()
When I click on this button, I would like to have it add a hyperlink to all
the cells M2 through M203. I have another macro that is simular to this but
can't figure out how to get it to work for the active x control button? Can
anybody please help?
--

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Hyperlink with an active x control button

Post your old code. It should be very simple to modify working code then to
start from scratch.

"Doug" wrote:

I have an active x control button called Sub Button12_Click()
When I click on this button, I would like to have it add a hyperlink to all
the cells M2 through M203. I have another macro that is simular to this but
can't figure out how to get it to work for the active x control button? Can
anybody please help?
--

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default Hyperlink with an active x control button

This is the old working code.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Application.EnableEvents = True
If Target.Column < 13 Then Exit Sub
Application.EnableEvents = False
ActiveWorkbook.FollowHyperlink Address:= _
"http://moneycentral.msn.com/investor/charts/chartdl.aspx?PT=3&showchartbt=Redraw+chart&compsym s=&D4=1&DD=1&D5=2&DCS=2&MA0=1&MA1=2&CF=4&D8=1&DB=1 &DC=1&D7=&D6=&symbol=" & Target.Value & "&nocookie=1&SZ=2"
Application.EnableEvents = True
End Sub
--
Thank you!


"Joel" wrote:

Post your old code. It should be very simple to modify working code then to
start from scratch.

"Doug" wrote:

I have an active x control button called Sub Button12_Click()
When I click on this button, I would like to have it add a hyperlink to all
the cells M2 through M203. I have another macro that is simular to this but
can't figure out how to get it to work for the active x control button? Can
anybody please help?
--

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hyperlink with an active x control button


something like this?Private Sub CommandButton1_Click()
'remove old hyperlinks:
For Each hyp In Range("M2:M203").Hyperlinks
hyp.Delete
Next hyp
'add new ones:
For Each cll In Range("M2:M203")
ActiveSheet.Hyperlinks.Add Anchor:=cll,
Address:="http://moneycentral.msn.com/investor/charts/chartdl.aspx?PT=3&showchartbt=Redraw+chart&compsym s=&D4=1&DD=1&D5=2&DCS=2&MA0=1&MA1=2&CF=4&D8=1&DB=1 &DC=1&D7=&D6=&symbol="
& cll.Value & "&nocookie=1&SZ=2"
Next cll
End Sub


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=126203

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
Execute an external file in Active X control Button KJ MAN Excel Programming 0 September 11th 08 02:10 PM
Difference between a Forms Control verus Active-X Control funGT350 Excel Discussion (Misc queries) 6 May 6th 08 11:20 PM
Hyperlink added to an activex control button Dimmer Excel Discussion (Misc queries) 1 August 11th 05 03:06 PM
Adding a control button to insert a date in the active cell. Mike Excel Discussion (Misc queries) 2 February 15th 05 06:27 PM


All times are GMT +1. The time now is 12:51 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"