Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have recorded a macro to sort within a range and have assigned it to a forms-button. It runs well while executing on XP machine. But people who try to run it from their 2000 OS get the following error. "Can't execute code in break mode" I am not able to reproduce this error on my XP machinee. Please help |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can you post the code?
-- HTH ------- Bob Phillips "Leena" wrote in message ... Hi I have recorded a macro to sort within a range and have assigned it to a forms-button. It runs well while executing on XP machine. But people who try to run it from their 2000 OS get the following error. "Can't execute code in break mode" I am not able to reproduce this error on my XP machinee. Please help |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bob,
The code is as follows. This works perfectly well on XP but gives an error on 2000. Sub sortmanagermajor() 'Range("C2").Select Range("A1:lastcellmajor").Sort Key1:=Range("C2"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End Sub Thanks in advance "Bob Phillips" wrote: Can you post the code? -- HTH ------- Bob Phillips "Leena" wrote in message ... Hi I have recorded a macro to sort within a range and have assigned it to a forms-button. It runs well while executing on XP machine. But people who try to run it from their 2000 OS get the following error. "Can't execute code in break mode" I am not able to reproduce this error on my XP machinee. Please help |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I assume "lastcellmajor" is a defined name/range.
Try changing it to this Sub sortmanagermajor() 'Range("C2").Select Range("A1:lastcellmajor").Sort _ Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, _ MatchCase:=False, _ Orientation:=xlTopToBottom End Sub I don't think xl2000 supported the DataOption1 argument (and it isn't needed). To get out of break mode, in the vbe, hit the reset button. -- Regards, Tom Ogilvy "Leena" wrote in message ... Hi Bob, The code is as follows. This works perfectly well on XP but gives an error on 2000. Sub sortmanagermajor() 'Range("C2").Select Range("A1:lastcellmajor").Sort Key1:=Range("C2"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End Sub Thanks in advance "Bob Phillips" wrote: Can you post the code? -- HTH ------- Bob Phillips "Leena" wrote in message ... Hi I have recorded a macro to sort within a range and have assigned it to a forms-button. It runs well while executing on XP machine. But people who try to run it from their 2000 OS get the following error. "Can't execute code in break mode" I am not able to reproduce this error on my XP machinee. Please help |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Leena" wrote in message ... Hi I have recorded a macro to sort within a range and have assigned it to a forms-button. It runs well while executing on XP machine. But people who try to run it from their 2000 OS get the following error. "Can't execute code in break mode" I am not able to reproduce this error on my XP machinee. Please help Are you sure the macro sorts exactly the same data on both machines? /Fredrik |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Leena
remove , _ DataOption1:=xlSortNormal from your code and see if it works - i think i've had this problem in the past where a macro recorded in 2003 puts this parameter in but it's not supported in 2000. Cheers JulieD "Leena" wrote in message ... Hi Bob, The code is as follows. This works perfectly well on XP but gives an error on 2000. Sub sortmanagermajor() 'Range("C2").Select Range("A1:lastcellmajor").Sort Key1:=Range("C2"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End Sub Thanks in advance "Bob Phillips" wrote: Can you post the code? -- HTH ------- Bob Phillips "Leena" wrote in message ... Hi I have recorded a macro to sort within a range and have assigned it to a forms-button. It runs well while executing on XP machine. But people who try to run it from their 2000 OS get the following error. "Can't execute code in break mode" I am not able to reproduce this error on my XP machinee. Please help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 - error saving file & error loading dll | Excel Discussion (Misc queries) | |||
Error: "Excel encountered an error and had to remove some formatti | Excel Discussion (Misc queries) | |||
Counting instances of found text (Excel error? Or user error?) | Excel Worksheet Functions | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) |