Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activecell - Probably very easy question
I have a Worksheet_Change event. In vba how can I find out the name of the range the changed cell is in? For the life of me I cant work out how to get it! -- MattShoreson ------------------------------------------------------------------------ MattShoreson's Profile: http://www.excelforum.com/member.php...fo&userid=3472 View this thread: http://www.excelforum.com/showthread...hreadid=377047 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Activecell - Probably very easy question
Dim nm as Name, rng as Range
for each nm in thisworkbook.Names on Error Resume Next set rng = nm.RefersToRange on Error goto 0 if not rng is nothing then if rng.parent = Target.Parent then if not intersect(rng, target) is nothing then msgbox "Member of " & nm & ", " & rng.Address(external:=True) ' either use "exit for" or continue to loop to see if it ' is in more than one named range end if end if end if Next -- Regards, Tom Ogilvy "MattShoreson" wrote in message news:MattShoreson.1q9eui_1118153134.0004@excelforu m-nospam.com... I have a Worksheet_Change event. In vba how can I find out the name of the range the changed cell is in? For the life of me I cant work out how to get it! -- MattShoreson ------------------------------------------------------------------------ MattShoreson's Profile: http://www.excelforum.com/member.php...fo&userid=3472 View this thread: http://www.excelforum.com/showthread...hreadid=377047 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ActiveCell.Offset Question | New Users to Excel | |||
If activecell.column = variable then activecell,offset (0,1) | Excel Discussion (Misc queries) | |||
Easy question | Excel Discussion (Misc queries) | |||
new user with easy question? not easy for me | New Users to Excel | |||
ActiveCell.Top question | Excel Programming |