G
Guest
Hi, I'll try and keep this brief!
I'd like to be able to control the visibility of certain sheets within my
workbook using checkboxes. I.e. on one worksheet is a index of items which
each have a separate worksheet dedicated to them. Is it possible to control
the visibility of these individual sheets by the user ticking the checkbox
next to the related item on the index sheet?
I tried assigning the following code to a forms checkbox, but get a 424
error on the second line:
Sub CheckBox1_Click()
If CheckBox1.Value = True Then
Sheets("Item 1").Visible = True
Else
Sheets("Item 1").Visible = False
End If
End Sub
What am I doing wrong (I'm a bit of an amateur!)??!
Also, thought I'd ask this but really don't know if it's possible: Can I use
the same above checkbox to import a worksheet from another file when checked?
This would be a major advantage in keeping file size down rather than having
a dozen hidden sheets?!
Thanks for all/any help
Gareth
I'd like to be able to control the visibility of certain sheets within my
workbook using checkboxes. I.e. on one worksheet is a index of items which
each have a separate worksheet dedicated to them. Is it possible to control
the visibility of these individual sheets by the user ticking the checkbox
next to the related item on the index sheet?
I tried assigning the following code to a forms checkbox, but get a 424
error on the second line:
Sub CheckBox1_Click()
If CheckBox1.Value = True Then
Sheets("Item 1").Visible = True
Else
Sheets("Item 1").Visible = False
End If
End Sub
What am I doing wrong (I'm a bit of an amateur!)??!
Also, thought I'd ask this but really don't know if it's possible: Can I use
the same above checkbox to import a worksheet from another file when checked?
This would be a major advantage in keeping file size down rather than having
a dozen hidden sheets?!
Thanks for all/any help
Gareth