View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default 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