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: 7
Default Runtime error 1004

Can anyone help me as to why I get a run time error 1004 - Insert method of
Range Class failed
when this bit of code reaches the "Selection" line?

Sub compare()

Row = 1
Do
If (Cells(Row, 1) < Cells(Row, 4)) Then
Cells(Row, 4).Select
Selection.Insert shift:=x1down
Else
Row = Row + 1
End If
Loop Until Row = 20

End Sub


 
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
Runtime Error 1004 Lizz45ie[_10_] Excel Programming 4 November 8th 05 10:51 PM
Another runtime 1004 error [email protected] Excel Discussion (Misc queries) 2 September 17th 05 09:21 AM
Runtime error 1004 Daniel Excel Programming 2 July 19th 05 04:37 AM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
What is RunTime Error '1004'? Ed Excel Programming 3 November 18th 04 07:09 PM


All times are GMT +1. The time now is 01:46 AM.

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"