View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Find reference to specific range in code


Not a problem if you use an object reference to refer to the range...
Dim rngCells as Excel.Range
Set rngCells = Worksheets("Mush").Range ("E3:G5")

Now if you want to change the range you only have to change one line.
Please top post. I have already read my own post.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




wrote in message
On 23 mrt, 13:55, "Jim Cone" wrote:
Hello,
Find/Replace in the VBE works pretty much the same as it does
on an Excel worksheet.
--
Jim Cone
San Francisco, USAhttp://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)





wrote in message
Hallo,
Is there any fast way to check if a specific worksheet range is
referred to in my VBA code? (Find ???)
I suppose it's a common problem when you move data from unnamed cells
in a worksheet to another place on the same worksheet . It may
require to review all the references in the code that refer to the
changed cells.
Thanks for any advice.
Herman


Thank you Jim.
I know how to work with find and replace in theVBA code but if you
move e.g. only a 3 by 3 range on the worksheet you have to do that
find and replace thing 9 times, not counting the absolute vs relative
possibilities!!
So I thougt there might be some better idea.
Thanks anyway
Herman