VB didn't like parts of the code, so I changed it to this:
Sub CopytheRowoftheActiveCell()
With Worksheets("All")
Selection.EntireRow.Copy Destination:=.Cells(Rows.Count
1).End(xlUp)(2)
Range("A1").CurrentRegion.Sort Key1:=.Range("B2"), _
Header:=xlYes
End With
End Sub
When I ran the macro, it said that the sort reference was not valid
--
Spreadshee
-----------------------------------------------------------------------
Spreadsheet's Profile:
http://www.excelforum.com/member.php...fo&userid=3473
View this thread:
http://www.excelforum.com/showthread.php?threadid=55113