Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / February 2007

Tip: Looking for answers? Try searching our database.

Macro Sort Errors

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mdeva - 31 Jan 2007 22:39 GMT
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
Jim Cone - 31 Jan 2007 23:50 GMT
Do you specify the range to sort in your code?
Are the "key" named ranges single column or multiple column ranges?
Signature

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware

"Mdeva" <Mdeva@discussions.microsoft.com>
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

Dave Peterson - 01 Feb 2007 00:06 GMT
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

> 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
[quoted text clipped - 14 lines]
>   Header:=xlYes, OrderCustom:=1, MatchCase:=False,
> Orientation:=xlTopToBottom, DataOption1:=xlSortNormal

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.