ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Application error 1004. (https://www.excelbanter.com/excel-programming/274097-application-error-1004-a.html)

Darren[_5_]

Application error 1004.
 
Hi,

Hope someone can help with this. Below is a macro that I've created using
ExcelXP. We send the spreadsheet to someone using Office 2000 and they
receive an application error 1004. Object or resource(this might be wrong)
defined error. We don't have any Office 2000 machines here and I can't
replicate the problem using XP.

(Where the 3 dots are (...) in the code is a replacement for a brandname
that I can't mention)

Sub ...()
'
' ... Macro
' Macro recorded 16/01/2003 by '

'
Sheets("Sheet2").Select
Range("Hdg").Select
Selection.AutoFilter Field:=1, Criteria1:="..."
Application.Goto Reference:="Claims"
Selection.Sort Key1:=Range("C7"), Order1:=xlAscending, Key2:=Range("D7")
_
, Order2:=xlAscending, Header:=xlYes, OrderCustom:=1,
MatchCase:=False _
, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2:= _
xlSortNormal
Range("A1").Select
End Sub

Please let me know if you've got any ideas.

Cheers, Darren.



keepITcool

Application error 1004.
 
Taking out the DataOptions arguments (twice) in the sort statement will
probably solve it.

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Darren" <@ wrote:

Hi,

Hope someone can help with this. Below is a macro that I've created
using ExcelXP. We send the spreadsheet to someone using Office 2000
and they receive an application error 1004. Object or resource(this
might be wrong) defined error. We don't have any Office 2000 machines
here and I can't replicate the problem using XP.

(Where the 3 dots are (...) in the code is a replacement for a
brandname that I can't mention)

Sub ...()
'
' ... Macro
' Macro recorded 16/01/2003 by '

'
Sheets("Sheet2").Select
Range("Hdg").Select
Selection.AutoFilter Field:=1, Criteria1:="..."
Application.Goto Reference:="Claims"
Selection.Sort Key1:=Range("C7"), Order1:=xlAscending,
Key2:=Range("D7")
_
, Order2:=xlAscending, Header:=xlYes, OrderCustom:=1,
MatchCase:=False _
, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2:= _
xlSortNormal
Range("A1").Select
End Sub

Please let me know if you've got any ideas.

Cheers, Darren.




Darren[_5_]

Application error 1004.
 
Great,

Thanks for the answer, it worked a treat.

Cheers, Darren.

"keepitcool" wrote in message
...
Taking out the DataOptions arguments (twice) in the sort statement will
probably solve it.

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Darren" <@ wrote:

Hi,

Hope someone can help with this. Below is a macro that I've created
using ExcelXP. We send the spreadsheet to someone using Office 2000
and they receive an application error 1004. Object or resource(this
might be wrong) defined error. We don't have any Office 2000 machines
here and I can't replicate the problem using XP.

(Where the 3 dots are (...) in the code is a replacement for a
brandname that I can't mention)

Sub ...()
'
' ... Macro
' Macro recorded 16/01/2003 by '

'
Sheets("Sheet2").Select
Range("Hdg").Select
Selection.AutoFilter Field:=1, Criteria1:="..."
Application.Goto Reference:="Claims"
Selection.Sort Key1:=Range("C7"), Order1:=xlAscending,
Key2:=Range("D7")
_
, Order2:=xlAscending, Header:=xlYes, OrderCustom:=1,
MatchCase:=False _
, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2:= _
xlSortNormal
Range("A1").Select
End Sub

Please let me know if you've got any ideas.

Cheers, Darren.







All times are GMT +1. The time now is 07:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com