Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
I am so confused! I need help with a check box and a macro.
I am trying to have a check box control whether certain columns, rows and
worksheets are hidden or unhidden. Over at the newusers forum someone gave me a macro that I have tried to modify to make this happen. Private Sub CheckBox1_Click() Range("A1").Select 'Active Cell Select If CheckBox1.Value = True Then Selection.EntireRow.Hidden = True Else: CheckBox1.Value = False Selection.EntireRow.Hidden = False End If End Sub The range should be the columns, rows and worksheets that are to be hidden or unhidden? The Select.Entire Row is what the macro acts on? If I've renamed my check boxes than I should use that name in place on CheckBox1? Any help would be appreciate. Marc |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
I am so confused! I need help with a check box and a macro.
hi
this will hide row 1 Private Sub CheckBox1_Click() Columns("A:A").Select Range("A1").Activate 'Active Cell Select If CheckBox1.Value = True Then Range("A1").EntireRow.Hidden = True Else: CheckBox1.Value = False Range("A1").EntireRow.Hidden = False End If End Sub Regards Yngve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Confused | Excel Worksheet Functions | |||
:S confused :S | Charts and Charting in Excel | |||
Sorry I am confused | Excel Discussion (Misc queries) | |||
check off, look up forms - VERY confused | Excel Discussion (Misc queries) |