Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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 what’s 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
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
Assign hyperlink to new commandbar control mabond Excel Programming 3 August 22nd 05 02:33 PM
how to Assign Hyperlink to Button in Spreadsheet Warren Deeker Excel Discussion (Misc queries) 1 June 9th 05 02:05 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM
Macro to Copy Hyperlink to another file as a HYPERLINK, not text... dollardoc Excel Programming 1 April 7th 05 12:47 AM
still can't assign MACRO grin2000[_11_] Excel Programming 3 June 22nd 04 04:17 AM


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