Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assign a macro to a hyperlink
I found this whilst trawling the web and I was wondering if there wa some way to modify the macro (specifically the 'Select Cas Target.Address' 'Case $A$1″' area) to run through many rows without having t create a seperate Case per row (i.e. having 'i' as the number of row and creating 'Case $A$i″). I would be grateful for any thoughts on this matter :) Cheers. -"Independent of the hyperlink, put a SelectionChange event in th worksheet code module. To do this, right click the sheet tab, an select View Code. In the code module that pops up, select Workshee from the top left dropdown, which puts the following procedure into th code module:"- Code ------------------- Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub You then adjust whats between the Sub and End Sub to get what you want: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Select Case Target.Address Case $A$1″ carry out action for Cell A1 Case $A$2″ carry out action for Cell A2 etc. End Select End Sub ------------------- -- Damin ----------------------------------------------------------------------- Daminc's Profile: http://www.excelforum.com/member.php...fo&userid=2707 View this thread: http://www.excelforum.com/showthread.php?threadid=53720 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Assign hyperlink to new commandbar control | Excel Programming | |||
how to Assign Hyperlink to Button in Spreadsheet | Excel Discussion (Misc queries) | |||
Intra-workbook hyperlink: macro/function to return to hyperlink ce | Excel Discussion (Misc queries) | |||
Macro to Copy Hyperlink to another file as a HYPERLINK, not text... | Excel Programming | |||
still can't assign MACRO | Excel Programming |