Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I require code to run a macro dependant on the date | Excel Discussion (Misc queries) | |||
require macro or code for purchase order to do the following: | Excel Worksheet Functions | |||
help is require with this | Excel Worksheet Functions | |||
Require some help! | Excel Programming | |||
Require extra funtionality - existing code included | Excel Programming |