If you used a checkbox from the Control toolbox toolbar, you can use a macro
like:
Option Explicit
Private Sub CheckBox1_Click()
If Me.CheckBox1.Value = True Then
Worksheets("sheet1").Visible = xlSheetVisible
Else
Worksheets("sheet1").Visible = xlSheetHidden
End If
End Sub
If you used a checkbox from the Control toolbox toolbar, you can use a macro
like:
Option Explicit
Private Sub CheckBox1_Click()
If Me.CheckBox1.Value = True Then
Worksheets("sheet1").Visible = xlSheetVisible
Else
Worksheets("sheet1").Visible = xlSheetHidden
End If
End Sub
Thanks very much Dave..you are awesome..this works great. Could I ask
one more question if I want to hide/unhide more than one sheet at a
time how would I do that.
thanks,
Bill
I have never written computer code before so bear with me.
I have a drop down box in cell B18, with four options (a, b, c, d). How do I write a macro to say that when 'a' is chosen from the drop down box, tab 1 will appear. It will continue, when 'b' is chosen, tab 2 will appear. I want the other tabs to be hidden when the associated choice in the menu is not chosen.
Many thanks.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.