craigs23
New Member
Hi All,
I am returning to this board after som invaluable advice I recieved previousley.
My question this time relates to the use of CheckBoxes on userforms.
Basically I have a Master worksheet which contains a list of documents in Rows 1 to 15
I then Have a userform with 15 tickboxes which mirror the list of doicuments on the master sheet.
The user then ticks the relevant checkbox if the document is required for this project.
I then want to hide the remainder of the rows (where Checkbox has not been ticked) which will then leave the user with a worksheet listing only the required (ticked) rows.
I have come up with the following code which works to some extent, but my question is do I need to replicate this code for each tickbox or is there a more effiecent way?
Thanks in advance:
I am returning to this board after som invaluable advice I recieved previousley.
My question this time relates to the use of CheckBoxes on userforms.
Basically I have a Master worksheet which contains a list of documents in Rows 1 to 15
I then Have a userform with 15 tickboxes which mirror the list of doicuments on the master sheet.
The user then ticks the relevant checkbox if the document is required for this project.
I then want to hide the remainder of the rows (where Checkbox has not been ticked) which will then leave the user with a worksheet listing only the required (ticked) rows.
I have come up with the following code which works to some extent, but my question is do I need to replicate this code for each tickbox or is there a more effiecent way?
Thanks in advance:
Code:
Private Sub CheckBox_Click()
'hide or unhide Row:
If CheckBox1.Value = False Then
Sheet1.Rows("1:1").Hidden = True
Else
Sheet1.Rows("1:1").Hidden = False
End If
End Sub