Opening a sheet when you have the CodeName as a string

BrighterLater

Board Regular
Joined
Sep 16, 2005
Messages
112
I think I am missing something obvious here but if I have the CodeName of a sheet as a string then can I use it to directly activate the sheet?
 

BrighterLater

Board Regular
Joined
Sep 16, 2005
Messages
112
Ok I know how to do it

if the CodeName is Fred, say then

ThisWorkbook.VBProject.VBComponents("Fred").Activate
does it
 

Forum statistics

Threads
1,077,782
Messages
5,336,284
Members
399,074
Latest member
rlong98

Some videos you may like

This Week's Hot Topics

Top