sorting code problems

  • Thread starter Thread starter DKY
  • Start date Start date
D

DKY

I try this code to sort my sheet but end up losing my header (which i
row 1) Can anyone help me figure out why?


Code
 
Change xlGuess to xlYes

Rows("1:61775").Select
Range("C1").Activate
Selection.sort Key1:=Range("C1"), Order1:=xlAscending, Header:= _
xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
 
Hi,
Read the sort parameters, Header =: xlGuess. ( and check the sort
parameters in Help)
Excell did a wrong guess. Change it to xlYes
Regards,

JY
 

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

Back
Top