Macro Sort Errors

G

Guest

I don't imagine there's any solution, but I've had a number of sort problems
in Excel 2003. The one I'm currently experiencing is that Excel doesn't seem
to know Ascending from Descending - or Softie , in their infinite wisdom, is
experimenting with AI instead of following simple VB. The following code
sorts Ascending sometimes and Descending others, depending on how I manually
sort the spreadsheet in the most recent iteration. That is - if I select the
area and using the sort keys, sort in D-A-D order, it works, but if I
manually sort the sheet in D-D-D order, the macro gets confused and also
sorts in D-D-D.

As I say, it's very likely bug #1243162497162.

Calculate
Key1:=Range("Done"), Order1:=xlDescending, _
Key2:=Range("Who"), Order1:=xlAscending, _
Key3:=Range("Priority"), Order1:=xlDescending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
 
J

Jim Cone

Do you specify the range to sort in your code?
Are the "key" named ranges single column or multiple column ranges?
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Mdeva" <[email protected]>
wrote in message
I don't imagine there's any solution, but I've had a number of sort problems
in Excel 2003. The one I'm currently experiencing is that Excel doesn't seem
to know Ascending from Descending - or Softie , in their infinite wisdom, is
experimenting with AI instead of following simple VB. The following code
sorts Ascending sometimes and Descending others, depending on how I manually
sort the spreadsheet in the most recent iteration. That is - if I select the
area and using the sort keys, sort in D-A-D order, it works, but if I
manually sort the sheet in D-D-D order, the macro gets confused and also
sorts in D-D-D.

As I say, it's very likely bug #1243162497162.

Calculate
Key1:=Range("Done"), Order1:=xlDescending, _
Key2:=Range("Who"), Order1:=xlAscending, _
Key3:=Range("Priority"), Order1:=xlDescending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
 
D

Dave Peterson

And what do you have in those fields?

Are they formulas or constants?

Are they formulas that point to other sheets--like this:

=sheet999!a1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top