J
Jonatas Vasconcellos
I would like to know how to hide / unhide sheets based on user answers in a
"main menu" sheet. Example: There are 2 sheets, "May" and "June", initially
hidden. In the "main menu" sheet (which is always visible), the user can type
either "show" or "hide" after each sheet name. After clicking on a "refresh"
button, the workbook refreshes showing or hiding the selected worksheets. I
am trying to use the following code, but it doesn't work. Hope you can help
me with this issue.
Range("H7").Activate
If Activecell.Value = "show" Then
Workbook.Sheets("May").visible = true
Else
Workbook.sheets("May").visible = false
End if
Range(ActiveCell.Offset(1,0)).Activate
If activecell.value = "show" then
Workbook.sheets("June").visible = true
Else
Workbook.sheets("June").visible = false
End if
"main menu" sheet. Example: There are 2 sheets, "May" and "June", initially
hidden. In the "main menu" sheet (which is always visible), the user can type
either "show" or "hide" after each sheet name. After clicking on a "refresh"
button, the workbook refreshes showing or hiding the selected worksheets. I
am trying to use the following code, but it doesn't work. Hope you can help
me with this issue.
Range("H7").Activate
If Activecell.Value = "show" Then
Workbook.Sheets("May").visible = true
Else
Workbook.sheets("May").visible = false
End if
Range(ActiveCell.Offset(1,0)).Activate
If activecell.value = "show" then
Workbook.sheets("June").visible = true
Else
Workbook.sheets("June").visible = false
End if