Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Object works in Excel 2000 but not in 2003 | Excel Programming | |||
external data works in 2003 not in 2000 | Excel Programming | |||
VB Code works in 2000, but not 2003 | Excel Programming | |||
Why 'Unprotect' works for 2003 but not 2000?! | Excel Programming | |||
#VALUE! error: vlookup works in Excel 2000 but not 2003 | Excel Discussion (Misc queries) |