I am planning a file with about 30 worksheets, 3 for 10 different departments. To make it easier for staff, I would like to create a data validation list of the 10 departments and use this to drive what worksheets are visible or hidden.
The simple version is below:
Sub Worksheet_calcuation()
IF Sheets("Admin").b1="DEN" Then
Sheets("DEN Summary").Visible = True
Sheets("ENT Summary").Visible = False
Else
Sheets("DEN Summary").Visible = False
Sheets("ENT Summary").Visible = True
End If
End Sub
Where DEN is the selection from the dropdown data validation list on the Admin worksheet.
I get no errors when checking the code, but the file does not correctly hide the specific worksheets. Any suggestions would be appreciated.
thatlem
The simple version is below:
Sub Worksheet_calcuation()
IF Sheets("Admin").b1="DEN" Then
Sheets("DEN Summary").Visible = True
Sheets("ENT Summary").Visible = False
Else
Sheets("DEN Summary").Visible = False
Sheets("ENT Summary").Visible = True
End If
End Sub
Where DEN is the selection from the dropdown data validation list on the Admin worksheet.
I get no errors when checking the code, but the file does not correctly hide the specific worksheets. Any suggestions would be appreciated.
thatlem