Run-time error 1004

  • Thread starter Thread starter aarslev
  • Start date Start date
A

aarslev

Anyone - help!

I've got this scenario: Excel 2002 with a sheet where the followng
error comes up:

Run-time error '1004'
Application-defined or object-defined error. When I start the debugger
the following VBA line comes up:

Cells.Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
_
DataOption1:=xlSortNormal
End Sub

I can't see the error here. Please help - and merry Christmas to You
all!
 
If that's all the code then the error may be caused
because you haven't specified which worksheet you are
referring to.

Try:
ActiveSheet.Cells.Select
 
Back
Top