Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Sort works in 2003 but not in 2000

This code works in 2003 but not on another PC with 2000
Selection.Sort Key1:=Range(Cells(13, NewSort1), Cells(13, NewSort1)), _

Order1:=xlAscending, Header:=xlYes, _

OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

Any ideas why not? I do not have access to a PC with 2000 on it.
Other posts mention DataOption2 but this does not appear here.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Sort works in 2003 but not in 2000


What does "but not on another PC" mean?
What happens when you run the code?
Is the sort done incorrectly.
Do you get an error? If so what error?
How is NewSort1 declared?
What is its value?
Does the Selected range encompass the NewSort1 Column?
Is the code installed in the same place and in the same type of module on both machines?
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Gleam"
wrote in message
This code works in 2003 but not on another PC with 2000
Selection.Sort Key1:=Range(Cells(13, NewSort1), Cells(13, NewSort1)), _

Order1:=xlAscending, Header:=xlYes, _

OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

Any ideas why not? I do not have access to a PC with 2000 on it.
Other posts mention DataOption2 but this does not appear here.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Sort works in 2003 but not in 2000

Thank you for your suggestions. Here is what I have discovered.
The spreadsheet works fine on one PC with Excel v2003, but fails to work on
another PC with Excel v2000. The second computer is about 45 minutes drive
away.
A third party is running the code on the 2000 PC, so following your
suggestion I went back and got more information.
What is supposed to happen is that when a command button is clicked, the
macro OrigDest runs and sets NewSort1=29 (Column AC) and then calls a
subroutine using this statement "StandardSort NewSort1" (No brackets)

What appears to happen is that a subroutine called Open_Edit_Screen runs
instead. My idea that it was a sort problem appears to be wrong.

Any ideas?

"Jim Cone" wrote:


What does "but not on another PC" mean?
What happens when you run the code?
Is the sort done incorrectly.
Do you get an error? If so what error?
How is NewSort1 declared?
What is its value?
Does the Selected range encompass the NewSort1 Column?
Is the code installed in the same place and in the same type of module on both machines?
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Gleam"
wrote in message
This code works in 2003 but not on another PC with 2000
Selection.Sort Key1:=Range(Cells(13, NewSort1), Cells(13, NewSort1)), _

Order1:=xlAscending, Header:=xlYes, _

OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

Any ideas why not? I do not have access to a PC with 2000 on it.
Other posts mention DataOption2 but this does not appear here.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Sort works in 2003 but not in 2000


What you describe will be very difficult to diagnose from afar.
The only thing that comes to mind is the possibility of event code or an add-in interfering.
Have them uncheck all add-ins in Tools | Add-ins and see what happens.
Make a list of the installed add-ins before unchecking them.
If that cures the problem, then add them back one at a time until the problem occurs.

Also, check the ThisWorkbook module and the module behind each sheet for any
code that might be calling the Open_Edit sub.

Of course, you could pack a sack lunch, go over there and step thru the code. <g
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Gleam"
wrote in message
Thank you for your suggestions. Here is what I have discovered.
The spreadsheet works fine on one PC with Excel v2003, but fails to work on
another PC with Excel v2000. The second computer is about 45 minutes drive
away.
A third party is running the code on the 2000 PC, so following your
suggestion I went back and got more information.
What is supposed to happen is that when a command button is clicked, the
macro OrigDest runs and sets NewSort1=29 (Column AC) and then calls a
subroutine using this statement "StandardSort NewSort1" (No brackets)

What appears to happen is that a subroutine called Open_Edit_Screen runs
instead. My idea that it was a sort problem appears to be wrong.
Any ideas?




"Jim Cone" wrote:
What does "but not on another PC" mean?
What happens when you run the code?
Is the sort done incorrectly.
Do you get an error? If so what error?
How is NewSort1 declared?
What is its value?
Does the Selected range encompass the NewSort1 Column?
Is the code installed in the same place and in the same type of module on both machines?
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)





"Gleam"
wrote in message
This code works in 2003 but not on another PC with 2000
Selection.Sort Key1:=Range(Cells(13, NewSort1), Cells(13, NewSort1)), _

Order1:=xlAscending, Header:=xlYes, _

OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

Any ideas why not? I do not have access to a PC with 2000 on it.
Other posts mention DataOption2 but this does not appear here.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Sort works in 2003 but not in 2000

For the record, I eventually found a local PC with version 2000 annd found
that if I removed protection from the sheet, the macro buttons worked as
intended. With sheet protection on, the macros were runing the wrong macro.

Thank you for the ideas.

"Jim Cone" wrote:


What you describe will be very difficult to diagnose from afar.
The only thing that comes to mind is the possibility of event code or an add-in interfering.
Have them uncheck all add-ins in Tools | Add-ins and see what happens.
Make a list of the installed add-ins before unchecking them.
If that cures the problem, then add them back one at a time until the problem occurs.

Also, check the ThisWorkbook module and the module behind each sheet for any
code that might be calling the Open_Edit sub.

Of course, you could pack a sack lunch, go over there and step thru the code. <g
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Gleam"
wrote in message
Thank you for your suggestions. Here is what I have discovered.
The spreadsheet works fine on one PC with Excel v2003, but fails to work on
another PC with Excel v2000. The second computer is about 45 minutes drive
away.
A third party is running the code on the 2000 PC, so following your
suggestion I went back and got more information.
What is supposed to happen is that when a command button is clicked, the
macro OrigDest runs and sets NewSort1=29 (Column AC) and then calls a
subroutine using this statement "StandardSort NewSort1" (No brackets)

What appears to happen is that a subroutine called Open_Edit_Screen runs
instead. My idea that it was a sort problem appears to be wrong.
Any ideas?




"Jim Cone" wrote:
What does "but not on another PC" mean?
What happens when you run the code?
Is the sort done incorrectly.
Do you get an error? If so what error?
How is NewSort1 declared?
What is its value?
Does the Selected range encompass the NewSort1 Column?
Is the code installed in the same place and in the same type of module on both machines?
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)





"Gleam"
wrote in message
This code works in 2003 but not on another PC with 2000
Selection.Sort Key1:=Range(Cells(13, NewSort1), Cells(13, NewSort1)), _

Order1:=xlAscending, Header:=xlYes, _

OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

Any ideas why not? I do not have access to a PC with 2000 on it.
Other posts mention DataOption2 but this does not appear here.



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
Object works in Excel 2000 but not in 2003 IBTrini Excel Programming 2 March 28th 07 03:01 AM
external data works in 2003 not in 2000 mikeolson Excel Programming 2 March 13th 07 01:14 PM
VB Code works in 2000, but not 2003 [email protected] Excel Programming 2 June 21st 06 09:13 AM
Why 'Unprotect' works for 2003 but not 2000?! OrientalPearl Excel Programming 13 April 3rd 06 01:44 AM
#VALUE! error: vlookup works in Excel 2000 but not 2003 Nick Ersdown Excel Discussion (Misc queries) 6 November 25th 05 12:23 PM


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