T
tracks via OfficeKB.com
The following is the code i need some help with
SUB co()
Dim rng1 As Range
Dim rng2 As Range
Dim rng3 As Range
Set rng1 = Worksheets("DATE").Range("B4")
Set rng2 = Worksheets("summ").Range("A6:.cells(rows.count,3).End
(xlUp)")
Set rng3 = Worksheets("summ").Range("A6:.CELLS(ROWS.COUNT,5).End
(xlUp)")
X = 0
Y = 0
If Month(rng1) > Month(rng2) Then
Range("rng3").Copy _
Worksheets("sheet3").Range("A6:E31").Offset(X, Y)
X = X + 7
Y = Y - 31
Else
End If
End Sub
when I try to run this in debugger to test it, I get the following error
Run-Time Error '1004':
Application-defined or Object-defined Error
please explain and help.
rick mason
SUB co()
Dim rng1 As Range
Dim rng2 As Range
Dim rng3 As Range
Set rng1 = Worksheets("DATE").Range("B4")
Set rng2 = Worksheets("summ").Range("A6:.cells(rows.count,3).End
(xlUp)")
Set rng3 = Worksheets("summ").Range("A6:.CELLS(ROWS.COUNT,5).End
(xlUp)")
X = 0
Y = 0
If Month(rng1) > Month(rng2) Then
Range("rng3").Copy _
Worksheets("sheet3").Range("A6:E31").Offset(X, Y)
X = X + 7
Y = Y - 31
Else
End If
End Sub
when I try to run this in debugger to test it, I get the following error
Run-Time Error '1004':
Application-defined or Object-defined Error
please explain and help.
rick mason