i have the following code:
If Sheets("EstimateTemplate").Visible Then
Sheets("EstimateTemplate").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("Navigation").Select
Else
Sheets("EstimateTemplate").Visible = True
Sheets("Navigation").Select
End If
how can i wrap it with "IF SHEET EXISTS" clause
i tried the following which didnt work
IF not Sheets("EstimateTemplate) = "" then
If Sheets("EstimateTemplate").Visible Then
Sheets("EstimateTemplate").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("Navigation").Select
Else
Sheets("EstimateTemplate").Visible = True
Sheets("Navigation").Select
End If
end if
برچسب:
نویسنده: استخدام کار