Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Execute an external file in Active X control Button | Excel Programming | |||
Difference between a Forms Control verus Active-X Control | Excel Discussion (Misc queries) | |||
Hyperlink added to an activex control button | Excel Discussion (Misc queries) | |||
Adding a control button to insert a date in the active cell. | Excel Discussion (Misc queries) |