Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Autofilter error in '97, not 2000
I have a VBA Excel macro which runs happily in Office 2000 but falls
over with the 1004 error ("Autofilter method of Range Class Failed") in Office 97 (SR 2) The code in question is Sheets(3).Range("A4")..AutoFilter , _ field:=7, _ Criteria1:= "*Open*" This works fine in Office 2000, but all users still using Office 97 report this error (tried both NT and W2K OS's) I have tried the MS KB and have trawled the web and usenet for a couple of days now but I have found no solution. Can anyone help? TIA Foggy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Autofilter error in '97, not 2000
Whenever I see the 1004 error with words that say it worked in xl2k, but not
xl97, I think of code being run from a control on the worksheet from the ControlToolbox toolbar. (Like a commandbutton). If that describes your situation, then try changing the .takefocusonclick property of that control to False. If the control you're using doesn't have that property, then add this line near the top of your code: activecell.activate Foggy wrote: I have a VBA Excel macro which runs happily in Office 2000 but falls over with the 1004 error ("Autofilter method of Range Class Failed") in Office 97 (SR 2) The code in question is Sheets(3).Range("A4")..AutoFilter , _ field:=7, _ Criteria1:= "*Open*" This works fine in Office 2000, but all users still using Office 97 report this error (tried both NT and W2K OS's) I have tried the MS KB and have trawled the web and usenet for a couple of days now but I have found no solution. Can anyone help? TIA Foggy -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Autofilter error in '97, not 2000
On Thu, 01 Apr 2004 21:28:35 -0600, Dave Peterson
wrote: Whenever I see the 1004 error with words that say it worked in xl2k, but not xl97, I think of code being run from a control on the worksheet from the ControlToolbox toolbar. (Like a commandbutton). If that describes your situation, then try changing the .takefocusonclick property of that control to False. If the control you're using doesn't have that property, then add this line near the top of your code: activecell.activate Thanks for this, but I have already tried it. The problem occurs in two places. Firstly in the Workbook_Open event and then later as a result of comboboxes on the actual sheet. Any further help is appreciated. Foggy |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Autofilter error in '97, not 2000
I don't have a next guess.
You may want to post a few more lines of code. Foggy wrote: On Thu, 01 Apr 2004 21:28:35 -0600, Dave Peterson wrote: Whenever I see the 1004 error with words that say it worked in xl2k, but not xl97, I think of code being run from a control on the worksheet from the ControlToolbox toolbar. (Like a commandbutton). If that describes your situation, then try changing the .takefocusonclick property of that control to False. If the control you're using doesn't have that property, then add this line near the top of your code: activecell.activate Thanks for this, but I have already tried it. The problem occurs in two places. Firstly in the Workbook_Open event and then later as a result of comboboxes on the actual sheet. Any further help is appreciated. Foggy -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Autofilter Error | Excel Discussion (Misc queries) | |||
Excel 2000 - Autofilter Limit | Excel Worksheet Functions | |||
using autofilter in a shared protected workbook excel 2000? | Excel Discussion (Misc queries) | |||
Using AutoFilter with worksheet protection in 2000 vs. 2003 | Excel Discussion (Misc queries) | |||
how do i protect an Autofilter funtion on Excel 2000 | Excel Worksheet Functions |