Hi all
I have a sheet ("Setup") in which I have a switch (as a drill down/validation list) betwee "CTR" and "Clarity". When value of cell BD2 = "CTR" I want some sheets to be shown and when I change value to "Clarity" I want other sheets to be shown.
I have already implemented a Auto_open sub, but now need one for when the change is done while the workbook is open. I have written the following macro in a module:
Sub Worksheet_Change(ByVal Target As Range)
'Macro to hide either Clarity or CTR related sheets
If Target.Value = "CTR" Then
Sheets("Utilization Data - Clarity").Visible = xlVeryHidden
Sheets("Utilization Pivot - Clarity").Visible = xlVeryHidden
Sheets("Utilization Charts - Clarity").Visible = xlVeryHidden
Sheets("Planned vs Actuals Charts - Cla").Visible = xlVeryHidden
Sheets("Planned vs Actuals Pivot - Clar").Visible = xlVeryHidden
Sheets("Utilization Data - CTR").Visible = True
Sheets("Utilization Pivot - CTR").Visible = True
Sheets("Utilization Charts - CTR").Visible = True
Sheets("Planned vs Actuals Pivot - CTR").Visible = True
Sheets("Planned vs Actuals Charts - CTR").Visible = True
ElseIf Target.Value = "Clarity" Then
Sheets("Utilization Data - CTR").Visible = xlVeryHidden
Sheets("Utilization Pivot - CTR").Visible = xlVeryHidden
Sheets("Utilization Charts - CTR").Visible = xlVeryHidden
Sheets("Planned vs Actuals Pivot - CTR").Visible = xlVeryHidden
Sheets("Planned vs Actuals Charts - CTR").Visible = xlVeryHidden
Sheets("Utilization Data - Clarity").Visible = True
Sheets("Utilization Pivot - Clarity").Visible = True
Sheets("Utilization Charts - Clarity").Visible = True
Sheets("Planned vs Actuals Charts - Cla").Visible = True
Sheets("Planned vs Actuals Pivot - Clar").Visible = True
Else
Exit Sub
End If
End Sub
However I can't even "step into" in Debug mode. Can anyone provide me with som guidence?
Br, CFL
I have a sheet ("Setup") in which I have a switch (as a drill down/validation list) betwee "CTR" and "Clarity". When value of cell BD2 = "CTR" I want some sheets to be shown and when I change value to "Clarity" I want other sheets to be shown.
I have already implemented a Auto_open sub, but now need one for when the change is done while the workbook is open. I have written the following macro in a module:
Sub Worksheet_Change(ByVal Target As Range)
'Macro to hide either Clarity or CTR related sheets
If Target.Value = "CTR" Then
Sheets("Utilization Data - Clarity").Visible = xlVeryHidden
Sheets("Utilization Pivot - Clarity").Visible = xlVeryHidden
Sheets("Utilization Charts - Clarity").Visible = xlVeryHidden
Sheets("Planned vs Actuals Charts - Cla").Visible = xlVeryHidden
Sheets("Planned vs Actuals Pivot - Clar").Visible = xlVeryHidden
Sheets("Utilization Data - CTR").Visible = True
Sheets("Utilization Pivot - CTR").Visible = True
Sheets("Utilization Charts - CTR").Visible = True
Sheets("Planned vs Actuals Pivot - CTR").Visible = True
Sheets("Planned vs Actuals Charts - CTR").Visible = True
ElseIf Target.Value = "Clarity" Then
Sheets("Utilization Data - CTR").Visible = xlVeryHidden
Sheets("Utilization Pivot - CTR").Visible = xlVeryHidden
Sheets("Utilization Charts - CTR").Visible = xlVeryHidden
Sheets("Planned vs Actuals Pivot - CTR").Visible = xlVeryHidden
Sheets("Planned vs Actuals Charts - CTR").Visible = xlVeryHidden
Sheets("Utilization Data - Clarity").Visible = True
Sheets("Utilization Pivot - Clarity").Visible = True
Sheets("Utilization Charts - Clarity").Visible = True
Sheets("Planned vs Actuals Charts - Cla").Visible = True
Sheets("Planned vs Actuals Pivot - Clar").Visible = True
Else
Exit Sub
End If
End Sub
However I can't even "step into" in Debug mode. Can anyone provide me with som guidence?
Br, CFL