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

I'm trying to run a spreadsheet program written by someone else, but
successfully used by many other people.

I'm getting an error message when I hit the "Go" button. The macro runs for
some time and then stops with this error message:

Run-time error '1004'
Application-defined or object defined error

Debug takes me to the following highlighted area:

Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal


I'm using Excel 2000 and Windows XP Pro (with SP2)

Can anyone shed light on this problem?

Thanks for any help,


Steve


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Error Message

Steve
What is selected when the code runs?
It sounds like the wrong range may be highlighted

cheers
Simon
Blog: www.smurfonspreadsheets.net


Steve wrote:
I'm trying to run a spreadsheet program written by someone else, but
successfully used by many other people.

I'm getting an error message when I hit the "Go" button. The macro runs for
some time and then stops with this error message:

Run-time error '1004'
Application-defined or object defined error

Debug takes me to the following highlighted area:

Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal


I'm using Excel 2000 and Windows XP Pro (with SP2)

Can anyone shed light on this problem?

Thanks for any help,


Steve


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Error Message

My guess Steve is one of the values within the sort is not supported
in XL2000. I had a similar problem in code written in XP which would
debug on XL2000. Can't text as I don't have XL2000. Does the debug not
highlight a specifc part of the sort code?

Try and record on your own PC the sort action and see how this code
matches to the one you quote

HTH

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Error Message

Simon,

In the line prior to that highlighted is this:

Columns ("A:A") . Select

Steve


"Simon Murphy" wrote in message
...
Steve
What is selected when the code runs?
It sounds like the wrong range may be highlighted

cheers
Simon
Blog: www.smurfonspreadsheets.net


Steve wrote:
I'm trying to run a spreadsheet program written by someone else, but
successfully used by many other people.

I'm getting an error message when I hit the "Go" button. The macro runs
for some time and then stops with this error message:

Run-time error '1004'
Application-defined or object defined error

Debug takes me to the following highlighted area:

Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal


I'm using Excel 2000 and Windows XP Pro (with SP2)

Can anyone shed light on this problem?

Thanks for any help,


Steve


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Error Message

DataOption# parms were added in xl2002.

Remove it and test it out.

Steve wrote:

I'm trying to run a spreadsheet program written by someone else, but
successfully used by many other people.

I'm getting an error message when I hit the "Go" button. The macro runs for
some time and then stops with this error message:

Run-time error '1004'
Application-defined or object defined error

Debug takes me to the following highlighted area:

Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

I'm using Excel 2000 and Windows XP Pro (with SP2)

Can anyone shed light on this problem?

Thanks for any help,

Steve


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Error Message

Dave,

How do I remove it? I get an error message if I just stick a " ' " in front
of the line.

Steve


"Dave Peterson" wrote in message
...
DataOption# parms were added in xl2002.

Remove it and test it out.

Steve wrote:

I'm trying to run a spreadsheet program written by someone else, but
successfully used by many other people.

I'm getting an error message when I hit the "Go" button. The macro runs
for
some time and then stops with this error message:

Run-time error '1004'
Application-defined or object defined error

Debug takes me to the following highlighted area:

Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

I'm using Excel 2000 and Windows XP Pro (with SP2)

Can anyone shed light on this problem?

Thanks for any help,

Steve


--

Dave Peterson



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Error Message

This
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
becomes
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

(preceding comma, line continuation character, parm and value are removed)



Steve wrote:

Dave,

How do I remove it? I get an error message if I just stick a " ' " in front
of the line.

Steve

"Dave Peterson" wrote in message
...
DataOption# parms were added in xl2002.

Remove it and test it out.

Steve wrote:

I'm trying to run a spreadsheet program written by someone else, but
successfully used by many other people.

I'm getting an error message when I hit the "Go" button. The macro runs
for
some time and then stops with this error message:

Run-time error '1004'
Application-defined or object defined error

Debug takes me to the following highlighted area:

Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

I'm using Excel 2000 and Windows XP Pro (with SP2)

Can anyone shed light on this problem?

Thanks for any help,

Steve


--

Dave Peterson


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Error Message

Dave,

It works!

Many thanks,

Steve


"Dave Peterson" wrote in message
...
This
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
becomes
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

(preceding comma, line continuation character, parm and value are removed)



Steve wrote:

Dave,

How do I remove it? I get an error message if I just stick a " ' " in
front
of the line.

Steve

"Dave Peterson" wrote in message
...
DataOption# parms were added in xl2002.

Remove it and test it out.

Steve wrote:

I'm trying to run a spreadsheet program written by someone else, but
successfully used by many other people.

I'm getting an error message when I hit the "Go" button. The macro
runs
for
some time and then stops with this error message:

Run-time error '1004'
Application-defined or object defined error

Debug takes me to the following highlighted area:

Selection.Sort Key1:=Range("A1"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
_
DataOption1:=xlSortNormal

I'm using Excel 2000 and Windows XP Pro (with SP2)

Can anyone shed light on this problem?

Thanks for any help,

Steve

--

Dave Peterson


--

Dave Peterson



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
replace VBA run-time error message with custom message BEEJAY Excel Programming 13 July 14th 06 03:59 PM
error message: compile error, argument not optional Pierre via OfficeKB.com Excel Programming 3 September 5th 05 03:45 PM
Excel XP error message Run Time Error 91 Lenny[_3_] Excel Programming 1 March 3rd 05 10:15 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


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