View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Erin Searfoss
 
Posts: n/a
Default I am going insane trying to work this out...

It looks like the text wrapped too soon. Try bringing "Header:=xlYes, _" up
to the line above it (make sure there is a space between the comma and the
word "Header"). Rows of code can only break onto a new line when they are
followed by a space and an underscore (as you can see follows "xlYes,"
above). Let me know if you continue to have trouble.

"Paul Cooke" wrote:


Firstly many thanks for taking the time to reply and for explaining it
in a easy way!!

I have followed your instuctions to the letter and when i paste the
code to the module the last section is Red as shown below

'Sort by ID number
Range("A1").CurrentRegion.Sort Key1:=Range("F2"), Order1:=xlAscending,
Header:=xlYes, _
Orientation:=xlTopToBottom

I saved the code anyway and tried to run it and it cam up with a Syntax
error and hi-lights the the row..

Range("A1").CurrentRegion.Sort Key1:=Range("F2"), Order1:=xlAscending,


Is this something I am doing wrong?


Thanks again


--
Paul Cooke
------------------------------------------------------------------------
Paul Cooke's Profile: http://www.excelforum.com/member.php...o&userid=29268
View this thread: http://www.excelforum.com/showthread...hreadid=491675