![]() |
checkbox to hide/show row
hi,
if anyone can help it'd be appreciated. Here is what I'd like to accomplish: on sheet3 I want to insert a Category with checkboxes next to each item On sheet one I want to hide/show categories that have been checked...and hide the rows if I uncheck them. thank u for your input |
checkbox to hide/show row
Hi
The code below would be one way of doing it. Run this code in the worksheet with the checkboxes, it will control the hiding of rows 1-5 on sheet1. Option Explicit Dim WkSh As Worksheet Private Sub CheckBox1_Click() Set WkSh = ThisWorkbook.Sheets("Sheet1") If CheckBox1.Value = False Then WkSh.Rows("1:5").EntireRow.Hidden = True Else If WkSh.Rows("1:5").Hidden = True Then WkSh.Rows("1:5").EntireRow.Hidden = False End If End If End Sub Hope this helps Steve |
All times are GMT +1. The time now is 08:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com