reverse a "hide" function

D

DarrenL

Current code:

Private Sub CheckBox1_Click()
Range("A10:A28").EntireRow.Hidden = CheckBox1.Value
End Sub

I need to reverse the checkbox. Currently, when it is checked, the rows hide.
I need it to do the opposite.
Anyone?
Thanks
D
 
J

Joel

Use NOT

Private Sub CheckBox1_Click()
Range("A10:A28").EntireRow.Hidden = not CheckBox1.Value
End Sub
 

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.

Ask a Question

Top