View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
libby libby is offline
external usenet poster
 
Posts: 96
Default Run-time error 1004

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
-----Original Message-----
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!


---
Message posted from http://www.ExcelForum.com/

.