Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Error only on some machines ... VBA Sort function

Greetings,

I prepared a spreadsheet with macros for a client and an
error surfaces on their machines but not mine. They are
running Excel 2000 and I am running Excel 2002. Since I
can't spend that much time on their computer
troubleshooting the problem, I am in a really bad
situation.

Any guidance would be greatly appreciated.

When the following code is executed on their machines
(line breaks added for posting),

Sheets("Materials Archive").Range("A:G").Sort
Key1:=Worksheets("Materials Archive").Columns("A"),
Order1:=xlAscending, Header:=xlYes,
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal

I get the following message referring to all the above
code:

"Run-time error 1004
Application defined or object-defined error."

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Error only on some machines ... VBA Sort function

This worked in xl2000
Sub testerA()
Sheets("Materials Archive").Range("A:G").Sort _
Key1:=Worksheets("Materials Archive").Columns("A"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End Sub

DataOption1 was added in xl2002 I believe, so it is not recognized in
xl2000.

It doesn't appear to be necessary, so you can delete it.

--
Regards,
Tom Ogilvy

"William DeLeo" wrote in message
...
Greetings,

I prepared a spreadsheet with macros for a client and an
error surfaces on their machines but not mine. They are
running Excel 2000 and I am running Excel 2002. Since I
can't spend that much time on their computer
troubleshooting the problem, I am in a really bad
situation.

Any guidance would be greatly appreciated.

When the following code is executed on their machines
(line breaks added for posting),

Sheets("Materials Archive").Range("A:G").Sort
Key1:=Worksheets("Materials Archive").Columns("A"),
Order1:=xlAscending, Header:=xlYes,
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal

I get the following message referring to all the above
code:

"Run-time error 1004
Application defined or object-defined error."

Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Error only on some machines ... VBA Sort function

THANK YOU, THANK YOU, THANK YOU !!!!!!!!!!!!!!




-----Original Message-----
This worked in xl2000
Sub testerA()
Sheets("Materials Archive").Range("A:G").Sort _
Key1:=Worksheets("Materials Archive").Columns("A"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End Sub

DataOption1 was added in xl2002 I believe, so it is not

recognized in
xl2000.

It doesn't appear to be necessary, so you can delete it.

--
Regards,
Tom Ogilvy

"William DeLeo"

wrote in message
...
Greetings,

I prepared a spreadsheet with macros for a client and an
error surfaces on their machines but not mine. They are
running Excel 2000 and I am running Excel 2002. Since I
can't spend that much time on their computer
troubleshooting the problem, I am in a really bad
situation.

Any guidance would be greatly appreciated.

When the following code is executed on their machines
(line breaks added for posting),

Sheets("Materials Archive").Range("A:G").Sort
Key1:=Worksheets("Materials Archive").Columns("A"),
Order1:=xlAscending, Header:=xlYes,
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal

I get the following message referring to all the above
code:

"Run-time error 1004
Application defined or object-defined error."

Thanks in advance.



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error only on some machines ... VBA Sort function

This thread helped me a lot, thank you for taking the time

--
Message posted from http://www.ExcelForum.com

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
sort function for dates does not sort properly in Office 2007 Exc. Rosalie Excel Worksheet Functions 1 November 22nd 07 10:25 PM
Need exercise log template (weight machines and such) Banaba Excel Discussion (Misc queries) 1 February 28th 06 11:34 PM
sort function to sort for bell curve Kuby Excel Discussion (Misc queries) 4 December 16th 05 06:51 PM
Excel Sort function should not sort the cell formatting! Lisa D.N.1 Excel Worksheet Functions 1 December 28th 04 08:37 PM


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

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"