![]() |
Assign macro to check box?
Is it possible to make my macro turn on the auto filter when checked, and
turn it off when unchecked? Rows("3:3").Select Selection.AutoFilter Range("A4").Select End Sub |
Assign macro to check box?
hi
if using a check box from the control tool box, this should work auto filter is boolean meaning the same command that turns it on also turns it off if it's on. i removed the select and selection parts...........not needed. Private Sub CheckBox1_Click() If Me.CheckBox1.Value = True Then 'turn of Rows("3:3").AutoFilter Range("A4").Select Else 'turn off Rows("3:3").AutoFilter Range("A4").Select End If End Sub regards FSt1 "Munchkin" wrote: Is it possible to make my macro turn on the auto filter when checked, and turn it off when unchecked? Rows("3:3").Select Selection.AutoFilter Range("A4").Select End Sub |
All times are GMT +1. The time now is 12:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com