nagavineela
09-19-2010, 09:17 PM
Hi All,
How do we refer to sheets without using Sheetnames while developing the code in VBA.
For e.g., I have Sheet1 and Sheet2 with button macros. While developing the code, i have used sheetname as reference.
Requirement is if we copy Sheet1 and name as sheet3, though the logic is perfect since the sheet name in the code was Sheet1 will not work for Sheet3.
Can anyone help me in resolving how to point to the sheet without using Sheets("sheet1").....
How do we refer to sheets without using Sheetnames while developing the code in VBA.
For e.g., I have Sheet1 and Sheet2 with button macros. While developing the code, i have used sheetname as reference.
Requirement is if we copy Sheet1 and name as sheet3, though the logic is perfect since the sheet name in the code was Sheet1 will not work for Sheet3.
Can anyone help me in resolving how to point to the sheet without using Sheets("sheet1").....