View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Tjia[_2_] John Tjia[_2_] is offline
external usenet poster
 
Posts: 1
Default Returning the range name in VBA


I have a macro that I would like to run based on whether the cursor i
on a particular cell, or more specifically, if it is on a particula
range name. I've tried something like:

If Activecell.Range.Name="Revenue" then DoSomething

and other variations, but no luck. I can't seem to find the way t
return the range name. BTW, Revenue is a one-cell range.

If Activecell.Address="$C$3"="Revenue" then DoSomethin


works, but I would like to be able to use the range name to facilitat
worksheet changes later.

Thanks for any help

--
John Tji
-----------------------------------------------------------------------
John Tjia's Profile: http://www.excelforum.com/member.php...nfo&userid=468
View this thread: http://www.excelforum.com/showthread.php?threadid=26848