ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run-time error 1004 (https://www.excelbanter.com/excel-programming/286068-run-time-error-1004-a.html)

aarslev

Run-time error 1004
 
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/


libby

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/

.



All times are GMT +1. The time now is 08:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com