This Code works
and Code this doesn't work![]()
Please Login or Register to view this content.
So what am I missing here? Thanks for any help you can give me.![]()
Please Login or Register to view this content.
Mac
This Code works
and Code this doesn't work![]()
Please Login or Register to view this content.
So what am I missing here? Thanks for any help you can give me.![]()
Please Login or Register to view this content.
Mac
Last edited by CaptMac; 03-18-2016 at 01:09 PM. Reason: Corrected a line
Hi CaptMac
I suspect because Sheet and Name are reserved words in Excel.
Last edited by jaslake; 03-18-2016 at 12:44 PM.
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
SHEET is not a reserved word. I've used it lots.
Mac
Unqualified, Range refers to a range on the active worksheet, so if Worksheets("name") isn't active when the code executes, it won't work.![]()
Please Login or Register to view this content.
The same is true of the first code.
You are also not specifying a sort key.
Entia non sunt multiplicanda sine necessitate
SHG,
In fact SHEET is "ACTIVATE"ed. I changed the code to reflect that. That doesn't seem to be the problem. And I've tried it on my test code.
Mac
Here's the Answer:
When you sort, a sort is done on each column before the print of the whole thing is done.
And the spec for the column sort must be for only 1 column.
So you can't do a column sort over the range "A1:J9". It has to be "A1:A9".
Mac
Of course you can, just as you can from the user interface. You just need to specify the sort key.![]()
Please Login or Register to view this content.
And if you sort col A only, you destroy its relationship to the other columns.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks