N
Naji
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
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