Checkbox to hide or show rows
I put a checkbox from the control toolbox toolbar on a worksheet.
I double clicked on it and used this sub:
Option Explicit
Private Sub CheckBox1_Click()
Me.Rows("10:12").Hidden = not Me.CheckBox1.Value
End Sub
If it's checked, then show them??? (or remove the Not to reverse the toggle)
wendy wrote:
I need help creating a checkbox that works like a toggle - if checked, a macro will run to show certain rows on sheet; if unchecked, the rows remain hidden or get hidden if they were showing.
--
Dave Peterson
|