Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter works... just not in my ListBox_click!
Arrrggg!!!
I have this code that worked PERFECTLY when I use it on a Label_Click but it doesn't work when I copy it into a Listbox "Click". I get the following error: "Error 1004 - Autofilter Method of Range Class Failed" Private Sub TestText_Click() Call Reset_Filters Worksheets("Open Issues").Range("OpenIssues").AutoFilter _ field:=4, _ Criteria1:="Gustavo" Worksheets("Open Issues").Range("OpenIssues").AutoFilter _ field:=14, _ Criteria1:="=" End Sub This is SO frustrating because it worked fine an Hour Ago, and if I copy it to a label or text box, it works just fine.... Did I change a property without knowing it? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter works... just not in my ListBox_click!
1 idea comes to mind:
The listbox has a link cell associated with it. Is it possible that the link cell is inside your "OpenIssues" range? I don't use listboxes but often use comboboxes. I have to be very careful with the link cell changing and setting up a continuous loop. "Mike" wrote: Arrrggg!!! I have this code that worked PERFECTLY when I use it on a Label_Click but it doesn't work when I copy it into a Listbox "Click". I get the following error: "Error 1004 - Autofilter Method of Range Class Failed" Private Sub TestText_Click() Call Reset_Filters Worksheets("Open Issues").Range("OpenIssues").AutoFilter _ field:=4, _ Criteria1:="Gustavo" Worksheets("Open Issues").Range("OpenIssues").AutoFilter _ field:=14, _ Criteria1:="=" End Sub This is SO frustrating because it worked fine an Hour Ago, and if I copy it to a label or text box, it works just fine.... Did I change a property without knowing it? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofilter works... just not in my ListBox_click!
No, the list box is linked to a different range on a hidden sheet.
I finally stumbled on the "On Error Resume Next" command and it works fine... I just wish I knew why it crashes but when it resumes, it works perfect.... Thanks for the feedback, Mike "gocush" wrote: 1 idea comes to mind: The listbox has a link cell associated with it. Is it possible that the link cell is inside your "OpenIssues" range? I don't use listboxes but often use comboboxes. I have to be very careful with the link cell changing and setting up a continuous loop. "Mike" wrote: Arrrggg!!! I have this code that worked PERFECTLY when I use it on a Label_Click but it doesn't work when I copy it into a Listbox "Click". I get the following error: "Error 1004 - Autofilter Method of Range Class Failed" Private Sub TestText_Click() Call Reset_Filters Worksheets("Open Issues").Range("OpenIssues").AutoFilter _ field:=4, _ Criteria1:="Gustavo" Worksheets("Open Issues").Range("OpenIssues").AutoFilter _ field:=14, _ Criteria1:="=" End Sub This is SO frustrating because it worked fine an Hour Ago, and if I copy it to a label or text box, it works just fine.... Did I change a property without knowing it? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel 2007 autofilter change to 2003 autofilter functionality? | Excel Discussion (Misc queries) | |||
2007 excel autofilter back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
2007 excel autofilter change back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
autofilter problem in Mac, but works in Windows, Excel 2003 | Excel Discussion (Misc queries) | |||
How do I convert works file to excel without works software? | Excel Discussion (Misc queries) |