I'm using below code to refer to worksheet using code name (not sure if there's another way).
With a lot of worksheets the code takes a while.
Is there any way to speed up?
Tried "Application.ScreenUpdating = False" but doesn't make a difference.
With a lot of worksheets the code takes a while.
Is there any way to speed up?
Tried "Application.ScreenUpdating = False" but doesn't make a difference.
VBA Code:
Dim my_sheet As Worksheet, my_sheet_in_question As Worksheet
Application.ScreenUpdating = False
For Each my_sheet In ActiveWorkbook.Worksheets
If my_sheet.CodeName = "MySheetCodeName" Then
Set my_sheet_in_question = my_sheet
my_sheet_in_question.Visible = True
my_sheet_in_question.Select
Exit For
End If
Next my_sheet