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: 9
Default Run Time Error 1004 Application-defined or object-defined error forsimple loop? Need help with what's wrong?

I am coming across an run time error 1004 error when executing this
macro. The purpose of the macro is to find the last row of data in a
range from one spreadsheet and copy it to the same row in another
spreadsheet. It seems to have a problem with my paste function into
the new spreadsheet. What gives?



Private Sub CommandButton1_Click()



For row = 2 To 32

Do Until found = True


If IsEmpty(Range("C" & (row))) Then



found = True




Range("C" & row - 1 & ":O" & row - 1).Copy

Windows("Morning-Rpt.xls").Activate
Sheets("QFin").Activate

Range("C" & row - 1 & ":O" & row - 1).Paste

row = row + 1

Else

row = row + 1

End If

Loop

Next


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
Run-Time error 1004 Application defined or object defined error - WirelessPete Excel Programming 0 January 12th 09 11:00 PM
Run Time error '1004': Application-defined or object-defined error PBcorn Excel Programming 7 October 2nd 08 03:38 PM
Export a chart in a GIF file. Run-time error '1004': Application-defined or object-defined error; [email protected] Excel Programming 4 September 16th 07 11:09 PM
run time error 1004 : application defined or object defined error [email protected] Excel Programming 3 June 22nd 07 10:33 PM
Macro Run-time Error 1004 Application Defined or Object Defined Error Anddmx Excel Programming 6 June 9th 04 03:40 PM


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