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: 158
Default Select method failed - Error 400

The following code generates an error in Line 5

Sheets("APR").Select
Rows("9:9").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Sheets("Data").Select
Rows("25:25").Select ' Line 5 - Error happens here
Selection.Copy
Sheets("APR").Select
ActiveSheet.Paste

The error code is 400. The error description is "Select method
of Range class failed". I'm not sure why this error is occurring,
especially since the above code was generated by Excel's
"Record Macro" function.

Why would the above code work during "Record Macro",
but it generates an error when I run it from VBA code?
I basically have a button on my "APR" spreadsheet that calls
the above code.

Anybody know what's going on here?



 
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
Select method of Range class failed error message Jacob Skaria Excel Programming 0 May 1st 09 07:04 AM
error - select method failed - (columns.select) PBcorn Excel Programming 3 May 19th 08 10:49 AM
Excel VBA error - Select method of Range class failed R Ormerod Excel Programming 0 July 12th 07 09:02 PM
Error: method 'select' of object_worksheet' failed Carl Excel Discussion (Misc queries) 4 September 9th 06 08:52 PM
RT Error 1004, Select method of worksheet class failed Dana Sherbondy Excel Programming 2 October 1st 04 03:55 PM


All times are GMT +1. The time now is 02:34 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"