Home |
Search |
Today's Posts |
#3
![]() |
|||
|
|||
![]() bobm, I am not one of the VBA experts, but if your range is in a column and your checkbox is from the control toolbox and not from the Forms toolbar this code should work. Private Sub CheckBox1_Click() Dim i As Boolean Dim rng1 As Range Application.DisplayAlerts = False i = CheckBox1.Value Set rng1 = Range("D1:D25") 'Change to suit your needs If i = True Then rng1.EntireColumn.Hidden = True Else rng1.EntireColumn.Hidden = False End If Application.DisplayAlerts = True End Sub -- Casey ------------------------------------------------------------------------ Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545 View this thread: http://www.excelforum.com/showthread...hreadid=478267 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display form from an VB application in Excel | Excel Discussion (Misc queries) | |||
Cells User Select Locked after upgrade to Excel 2002 | Excel Discussion (Misc queries) | |||
How do you display Greek and Russian languages in excel? | Excel Discussion (Misc queries) | |||
How do I merge in a selected range of cells out of Excel? | Excel Discussion (Misc queries) | |||
How do I check for duplications in a range of data (excel)? | Excel Worksheet Functions |