Using sheet reference instead of name

  • Thread starter Thread starter Michelle
  • Start date Start date
M

Michelle

IN the VBE each sheet has a name that looks like "Sheet5(Data)"...
the sheet name is data, and I v=can refer to Sheets("Data"), How can I use
the sheet5 bit - the sheet's 'VB Name'?

Thanks

M
 
No guys, this is just theindex position of the sheet within the book and it
changes according to where the sheet comes in the book.

I am looking for a way of refering to the sheet regardless of its name or
position.

Any ideas?

M
 
Ah,

..codename

sub test

dim ws as worksheet
for each ws in activebook.worksheets
msgbox ws.codename & " - " & ws.name
next ws

end sub
 
Back
Top