Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple CHeck box to view/hide rows
I'm trying to create checkbox where if it's checked rows 6-9 show, if it's
unchecked they are hidden. I've go the follow, but I must be missing something... -------------------------- Private Sub Risk_Box() Application.ScreenUpdating = False If Risk_Box.Value = 0 Then Range("A6:A9").EntireRow.Hidden = True Else If Risk_Box.Value < 0 Then Range("A6:A9").EntireRow.Hidden = False End If End If Application.ScreenUpdating = True End Sub --------------------------- Thanks for the help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple CHeck box to view/hide rows
Hi Shelly
If you use a checkbox from the controltoolbox then try this for a checkbox named "CheckBox1" This is event code for thr sheetmodule Private Sub CheckBox1_Click() If CheckBox1.Value = False Then Range("A6:A9").EntireRow.Hidden = True Else Range("A6:A9").EntireRow.Hidden = False End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Shelly" wrote in message ... I'm trying to create checkbox where if it's checked rows 6-9 show, if it's unchecked they are hidden. I've go the follow, but I must be missing something... -------------------------- Private Sub Risk_Box() Application.ScreenUpdating = False If Risk_Box.Value = 0 Then Range("A6:A9").EntireRow.Hidden = True Else If Risk_Box.Value < 0 Then Range("A6:A9").EntireRow.Hidden = False End If End If Application.ScreenUpdating = True End Sub --------------------------- Thanks for the help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide & Show Rows based on Check Boxes | Excel Discussion (Misc queries) | |||
Is there a simple procedure to hide rows if a condition is met | Excel Discussion (Misc queries) | |||
Simple CHeck box to view/hide rows | Excel Programming | |||
simple code hide/show rows with cell = empty, set value or any val | Excel Programming | |||
Automate display/ hide rows in excel based on yes/no check box | Excel Discussion (Misc queries) |