Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default 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
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
excel 2007 autofilter change to 2003 autofilter functionality? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 10:05 PM
2007 excel autofilter back to 2003 autofilter? jonnybrovo815 Excel Discussion (Misc queries) 3 April 19th 10 08:11 PM
2007 excel autofilter change back to 2003 autofilter? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 05:53 PM
autofilter problem in Mac, but works in Windows, Excel 2003 Curran Excel Discussion (Misc queries) 1 March 11th 09 01:10 PM
How do I convert works file to excel without works software? CatMB Excel Discussion (Misc queries) 1 June 21st 05 04:12 PM


All times are GMT +1. The time now is 09:19 AM.

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"