View Single Post
 
Old 08-04-2012, 08:14 AM
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

If the sheet will always be in the same position then you can use its Index instead of its Name.

eg
Code:
Sheets(1).Select
Even better, if your code is in the same workbook, you can use its codename.

eg
Code:
Sheet1.Select
To see the difference between a sheet's Name and Codename, have a look at the attachment on this thread:
https://www.msofficeforums.com/excel...html#post36290
Reply With Quote