Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 148
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 148
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default 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
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
Help in Excel stopped working GaryDolman Excel Discussion (Misc queries) 0 January 4th 08 08:03 PM
Charts.add stopped working Carlo Charts and Charting in Excel 4 February 15th 07 03:52 PM
Web query has stopped working... andrewm27 Excel Discussion (Misc queries) 0 April 20th 06 05:28 AM
VB Stopped Working [email protected] Excel Worksheet Functions 1 April 28th 05 01:56 PM
Tab stopped working -- SCOTT-- Excel Programming 0 October 2nd 03 09:14 PM


All times are GMT +1. The time now is 02:01 PM.

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"