LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default error 1004 - application defined or object defined error


i am getting this error when i execute the following code:

Workbooks("Raw Luggage Data.xls").Activate <-- executes fine

Sheets("Raw Luggage - 1").Select <--executes
fine
Range("A7").Select <---gives
error
ActiveCell.End(xlDown).Select
lastrow = ActiveCell.Row
MsgBox lastrow

this code is in a different file called "get data macro" and i have
this same exact code in a macro in "raw luggage data" where it works
fine. i also tried to comment out the 3rd line and then execute the
code and it works. the only prob is that i would have to manually
select cell A7. i dont know why it doesnt work? could it be becasue the
macro is in a diff file?

edit: lastrow is already declared


--
kdp145
------------------------------------------------------------------------
kdp145's Profile: http://www.excelforum.com/member.php...o&userid=29594
View this thread: http://www.excelforum.com/showthread...hreadid=509388

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Time Error 1004 - Application-defined or object-defined error brent Excel Programming 2 October 3rd 05 05:23 PM
Run-time Error 1004: Application-defined or Object-defined Error Adrian Excel Programming 6 August 23rd 05 06:28 AM
Macro Run-time Error 1004 Application Defined or Object Defined Error Anddmx Excel Programming 6 June 9th 04 03:40 PM
Runtime Error 1004 -- Application Defined or Object Defined Error John[_51_] Excel Programming 3 September 4th 03 04:28 PM


All times are GMT +1. The time now is 03:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"