Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default advanced filter error 1004

Hey!
I have made a macro with advanced filter. When I share this workbook i get a
message:
"advanced filter in range mode failed: error 1004" (something like that).
The code is:
Sub Idag()
'
Dim område As Range
Dim kriterie As Range
Dim dato As Range

Set område = Range("Database")
Set kriterie = Range("kriterie")
Set dato = Range("A7")

Application.ScreenUpdating = False
Application.Goto Reference:=("Database")
område.AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
kriterie, Unique:=False
dato.Select

End Sub

Can anybody help!
TD


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default advanced filter error 1004

Using the data on the sheet when it fails, can you do it manually?

Are all these ranges on the same sheet? Is the code in a general module?
If the code is in a sheet module, then any range that is not in that should
should be prefaces with a reference to the sheet where the range is located.
For example, instead of Range("Database"), you would use
worksheets("sheet2").Range("Database") if the code were in the code module
for sheet1 and the range database is found on sheet2. Of course, if you
are not executing this code as part of event code (and it appears you are
not) it should be in a general/standard module rather than a sheet module.

--
Regards,
Tom Ogilvy

"Tove" wrote in message
...
Hey!
I have made a macro with advanced filter. When I share this workbook i get

a
message:
"advanced filter in range mode failed: error 1004" (something like that).
The code is:
Sub Idag()
'
Dim område As Range
Dim kriterie As Range
Dim dato As Range

Set område = Range("Database")
Set kriterie = Range("kriterie")
Set dato = Range("A7")

Application.ScreenUpdating = False
Application.Goto Reference:=("Database")
område.AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
kriterie, Unique:=False
dato.Select

End Sub

Can anybody help!
TD




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default advanced filter error 1004

I have 12 worksheets with database defined. Same macro on all sheets. Befor
I share the workbook the macro is ok. When I share the workbook i get this
message "...error 1004"
"Tom Ogilvy" skrev i melding
...
Using the data on the sheet when it fails, can you do it manually?

Are all these ranges on the same sheet? Is the code in a general module?
If the code is in a sheet module, then any range that is not in that
should
should be prefaces with a reference to the sheet where the range is
located.
For example, instead of Range("Database"), you would use
worksheets("sheet2").Range("Database") if the code were in the code
module
for sheet1 and the range database is found on sheet2. Of course, if you
are not executing this code as part of event code (and it appears you are
not) it should be in a general/standard module rather than a sheet module.

--
Regards,
Tom Ogilvy

"Tove" wrote in message
...
Hey!
I have made a macro with advanced filter. When I share this workbook i
get

a
message:
"advanced filter in range mode failed: error 1004" (something like that).
The code is:
Sub Idag()
'
Dim område As Range
Dim kriterie As Range
Dim dato As Range

Set område = Range("Database")
Set kriterie = Range("kriterie")
Set dato = Range("A7")

Application.ScreenUpdating = False
Application.Goto Reference:=("Database")
område.AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
kriterie, Unique:=False
dato.Select

End Sub

Can anybody help!
TD






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
Error msg on Advanced Filter Helen Excel Discussion (Misc queries) 0 April 3rd 08 04:52 PM
Advanced Filter - error message Mifty New Users to Excel 2 May 25th 06 07:02 PM
Error using Advanced Filter Unique Records headly Excel Discussion (Misc queries) 5 May 9th 06 01:36 AM
Advaced filter error 1004 Tove Excel Worksheet Functions 0 February 28th 05 01:54 PM
Error on advanced filter vba excel - 1004 Rachel Curran Excel Programming 1 June 4th 04 02:33 AM


All times are GMT +1. The time now is 05:53 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"