macro question


Posted by Jack on January 31, 2002 6:07 PM

I'm running a macro to do a few different things the last of which is perform a sort on a column (B). For some reason it keeps putting the header row at the of the sorted data. This is what I have for that portion:

Columns("A:H").Select
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

Any ideas as to what I'm doing wrong?

Thanks in advance...

Posted by Dan Aragon on January 31, 2002 6:33 PM

You wrote:
"For some reason it keeps putting the header row at the of the sorted data."

It keeps putting the header row where? At the top? At the bottom?

Posted by Ivan F Moala on January 31, 2002 10:53 PM

Header:=xlNo (NT)

Posted by Jack on February 01, 2002 6:30 AM

Sorry.. It puts the header at the end..



Posted by Dan Aragon on February 01, 2002 10:47 AM

In that case change:
Header:=xlYes