PC Review


Reply
Thread Tools Rate Thread

Assign macro to check box?

 
 
Munchkin
Guest
Posts: n/a
 
      19th Nov 2009
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

 
Reply With Quote
 
 
 
 
FSt1
Guest
Posts: n/a
 
      20th Nov 2009
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
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Assign Check boxes sixhobbits Microsoft Excel Discussion 10 19th Aug 2010 12:40 AM
Assign a value to a check box Violaine Microsoft Access Forms 1 8th Apr 2008 02:07 AM
Assign numeric value to a form check box? joenova Microsoft Excel Discussion 4 22nd Aug 2006 06:02 PM
How do I assign a value to check box in excel =?Utf-8?B?a2VsbHlob3J0b25Ac2JjZ2xvYmFsLm5ldA==?= Microsoft Excel Worksheet Functions 2 3rd Jan 2006 10:44 PM
assign value to a check box in code Ann Microsoft Access Forms 5 17th Oct 2003 08:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:49 PM.