Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba sorting stopped working
I have been using the following code for several weeks, and it has worked
fine. All of a sudden, it is not sorting anymore. Any ideas what nuances I need to check to verify are still in place? I don't recall messing with any of this. Range("y:AC").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Set pareto = table.Resize(fields, 5) pareto.Select Application.CutCopyMode = False pareto.Sort Key1:=Range("AA2"), Order1:=xlDescending, Key2:=Range( _ "AC2"), Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1, MatchCase _ :=False, Orientation:=xlTopToBottom ', DataOption1:=xlSortNormal, _ DataOption2:=xlSortNormal 'x1SortNormal is default TIA |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba sorting stopped working
"Papa Jonah" wrote in message ... I have been using the following code for several weeks, and it has worked fine. All of a sudden, it is not sorting anymore. Any ideas what nuances I need to check to verify are still in place? I don't recall messing with any of this. Range("y:AC").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Set pareto = table.Resize(fields, 5) pareto.Select Application.CutCopyMode = False pareto.Sort Key1:=Range("AA2"), Order1:=xlDescending, Key2:=Range( _ "AC2"), Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1, MatchCase _ :=False, Orientation:=xlTopToBottom ', DataOption1:=xlSortNormal, _ DataOption2:=xlSortNormal 'x1SortNormal is default TIA What happens? Do you get an error message? Can you sort manually? /Fredrik |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba sorting stopped working
I don't get any error messages. The code continues to generate a chart. It
just isn't sorted. "Fredrik Wahlgren" wrote: "Papa Jonah" wrote in message ... I have been using the following code for several weeks, and it has worked fine. All of a sudden, it is not sorting anymore. Any ideas what nuances I need to check to verify are still in place? I don't recall messing with any of this. Range("y:AC").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Set pareto = table.Resize(fields, 5) pareto.Select Application.CutCopyMode = False pareto.Sort Key1:=Range("AA2"), Order1:=xlDescending, Key2:=Range( _ "AC2"), Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1, MatchCase _ :=False, Orientation:=xlTopToBottom ', DataOption1:=xlSortNormal, _ DataOption2:=xlSortNormal 'x1SortNormal is default TIA What happens? Do you get an error message? Can you sort manually? /Fredrik |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba sorting stopped working
"Papa Jonah" wrote in message ... I don't get any error messages. The code continues to generate a chart. It just isn't sorted. What about "manual" sorting, i.e. Data|Sort? /Fredrik |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba sorting stopped working
"Papa Jonah" wrote in message ... That defeats the intent of having vba code. If you want, you can send the workbook to me and I will see if it works OK on my PC. /Fredrik |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba sorting stopped working
I encountered this same problem. I created a macro on one computer an
when I tried to use it on another terminal on our network it would no run. I found that removing the code "DataOption1:=x1SortNormal" solve the problem |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
vba sorting stopped working
I think that the option is xlSortNormal (the letter "l", not the digit "1").
On Tue, 19 Apr 2005 00:31:56 -0500, lid (robbg0326) wrote: I encountered this same problem. I created a macro on one computer and when I tried to use it on another terminal on our network it would not run. I found that removing the code "DataOption1:=x1SortNormal" solved the problem. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help in Excel stopped working | Excel Discussion (Misc queries) | |||
Charts.add stopped working | Charts and Charting in Excel | |||
Web query has stopped working... | Excel Discussion (Misc queries) | |||
VB Stopped Working | Excel Worksheet Functions | |||
Tab stopped working | Excel Programming |