erlisocial
New Member
- Joined
- Feb 5, 2020
- Messages
- 15
- Office Version
- 365
- 2016
- Platform
- Windows
Hi,
I have over 100 sheets with different names. (ABC, CDE, ENT etc). I have a VBA which requires the sheet selection many times throughout the code. I need to repeat the same code for the next sheet. Rather than me having to rename all the Sheets on my VBA code, is there a way were I can define that name and just change it once at the beginning of my statement and the Sheets to pick up that name and update my VBA code?
Many thanks in advance
I have over 100 sheets with different names. (ABC, CDE, ENT etc). I have a VBA which requires the sheet selection many times throughout the code. I need to repeat the same code for the next sheet. Rather than me having to rename all the Sheets on my VBA code, is there a way were I can define that name and just change it once at the beginning of my statement and the Sheets to pick up that name and update my VBA code?
Many thanks in advance
VBA Code:
Sub Sheet1 ()
''
Sheets("ABC").Select
Sheets("ABC").Select
Sheets("ABC").Select
Sheets("ABC").Select
''
End Sub