Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error with a Macro

I have a user who has created a spreadsheet with macros
for each column to run various reports. Each macro reads
the same; however the last column macro keeps erroring
out. I have tried correcting the statement and still can
not get it to run.

Range ("AN1"). Select
Selection.AutoFilter
Selection.AutoFilter Field:=40, Criteria1:="x"

The last statement is the one that keeps erroring. Can
anyone help. I'm very novice to Excel Macros.

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Error with a Macro

try

Range ("A1:AN1").CurrentRegion.Select
Selection.AutoFilter
Selection.AutoFilter Field:=40, Criteria1:="x"

--
Regards,
Tom Ogilvy


"Sondra" wrote in message
...
I have a user who has created a spreadsheet with macros
for each column to run various reports. Each macro reads
the same; however the last column macro keeps erroring
out. I have tried correcting the statement and still can
not get it to run.

Range ("AN1"). Select
Selection.AutoFilter
Selection.AutoFilter Field:=40, Criteria1:="x"

The last statement is the one that keeps erroring. Can
anyone help. I'm very novice to Excel Macros.

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error with a Macro

Tom:

Tried it and it didn't work
Range("A1:AN1").CurrentRegion.Select
Selection.AutoFilter

Selection.AutoFilter Field:=40, Criteria1:="x" (THIS ROW ERRORING)

ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Selection.AutoFilter

Any help would be appreciated.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for 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
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Macro error : Application-defined or object-defined error Joe Excel Discussion (Misc queries) 3 January 27th 06 02:32 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Macro Security Error No Macro Val Steed Excel Programming 1 September 10th 03 06:58 PM


All times are GMT +1. The time now is 12:51 AM.

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

About Us

"It's about Microsoft Excel"