#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Filter problem

A combobox contains the following code:

Private Sub cbCAT_Change()
Filtercolumn = 12
If cbCAT < "" Then
Selection.AutoFilter Field:=Filtercolumn, Criteria1:="=" &
cbCAT
Else
Selection.auofilter Field:=Filtercolumn
End If

End Sub

Problem
When cbCAT < "" then a filter is set according to the value of cbCAT.
That works just fine.

When the user blanks the value and cbCAT = "" I want to set the filter
off. When I do it manually in the worksheet, it works fine. However,
then I do it here in the macro, I get an error message.

Anybody know whe?

Glen

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DOR
 
Posts: n/a
Default Filter problem

Could it be because you have spelled "AutoFilter" incorrectly in the
statement following Else, e.g.

Selection.auofilter Field:=Filtercolumn

??

DOR

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table Data Filter Problem Pepikins Excel Discussion (Misc queries) 0 June 16th 05 09:12 AM
Custom Filter Problem plindman Excel Discussion (Misc queries) 2 June 2nd 05 04:30 PM
Macro for Filter Switches ... Maybe??? Ken Excel Discussion (Misc queries) 4 February 25th 05 05:30 PM
Filter Switches vs Macro? Ken Excel Discussion (Misc queries) 3 February 24th 05 10:31 PM
Advanced Filter using Date represented as text drice Excel Worksheet Functions 1 December 15th 04 04:56 PM


All times are GMT +1. The time now is 09:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"