Thread: Calling a Sheet
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Calling a Sheet

Sheet5.Range("A2").value = 6


--
Regards,
Tom Ogilvy


" wrote in
message ...
I write a lot of VBA excel reports for the company I work for and people

like
to rename sheets and then complain when the macro doesn't work anymore.

So I
found out you can call the sheets by their number. Well here is my

problem,
I think the sheets have to be in the order that you put them in. What if
someone moves the sheets arounds and ereases all the data. Is there a
specific way to call sheets by the sheet number that are show in the VBA?
For examples one of my sheets is called "Select a Group" and in VBA is is
shown as Sheet5(Select a Group) Is there a way I can call the Sheet5 part
because I know that will not change?

Thanks