I currently have two buttons. One that will show the hidden rows, the other
that will hide them again. However, i would rather change the two buttons to
a check box. So if the check box is quot;Checkedquot; it will show the hidden cells,
but if it is unchecked it will hide the cells again. I assume that is
possible.
Hi John,
Here's some code for a check box (originally sourced from Aaron Blood's
highlight.zip file at www.xl-logic.com/pages/vba.html):
Private Sub CheckBox1_Click()
If Sheets(1).CheckBox1 Then
'code for hiding rows
else
'code for unhiding rows
End If
End Sub
Nb: depending on your preference/caption in your check box, it may be
better around the other way.
Or another option is just to turn one of your two buttons into a toggle
amp; delete the other one. Have a look at thread below for ideas to adapt:
excelforum.com/showthread.php...=toggle button
hth
Rob Brockett
NZ
Always learning amp; the best way to learn is to experience...--
broro183
------------------------------------------------------------------------
broro183's Profile: www.excelforum.com/member.php...oamp;userid=30068
View this thread: www.excelforum.com/showthread...hreadid=535769
- Jan 12 Mon 2009 20:48
Check Box
close
全站熱搜
留言列表
發表留言