Hi,
I have some simple code below, please help me. It states I could be missing a SET statement....still learning. I am sure it would take you guys 5min to fix. Error comes up in the (Testcase.Close True) line....
[pre]
[/pre]
I have some simple code below, please help me. It states I could be missing a SET statement....still learning. I am sure it would take you guys 5min to fix. Error comes up in the (Testcase.Close True) line....
[pre]
Code:
Sub Cop_Rows()
Dim Testcase As Workbook
Dim b As Long
Application.ScreenUpdating = False
b = 7
Do While Cells(x, 5) <> ""
If Cells(b, 5) > "0" Then
Worksheets("Sheet1").Rows(x).Copy
Sheets("Sheet2").Cells(Sheets("Sheet2").Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlValues
Application.CutCopyMode = False
End If
x = x + 1
Testcase.Close True 'Error comes up here.....
Loop
Application.ScreenUpdating = True
End Sub