View Single Post
 
Old 08-05-2012, 11:29 PM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

Quote:
Originally Posted by macropod View Post
I'd prefer to work with sheet names. That way, if someone re-orders the worksheets, the code won't try to process the wrong one.
The reason I suggested using the worksheet's index is the OP said:
Quote:
It's always and only the first sheet I'm applying this to , by the way.

However, the fact that the user can change the both the sheet's order and name (if workbook structure is left unprotected) is why I suggested using the sheet's codename instead, because that cannot be changed by the user unless the user goes into the VBA IDE. This would be my preference.
Reply With Quote