Date event macro. Help!

L

lv619

Well after failing at using this sites useless search function i though
i may aswell start a thread.

Now, I have a cell renge of "B2:R2" which contain a series of dates t
which my workbook needs to be updated (i.e. copy data from one sheet t
a summary sheet when it's 20/07/2006, 27/07/2006 etc).

Can someone please make some suggestions on what i'm doing wrong wit
my code below (or if you could suggest a better process from m
problem).

I'm receiving a run time error where i have highlighted below, s
theirs obveously something wrong their
"Worksheets("Sheet4").Range("c4").Value" is =today() (todays date).

Thanks.

Sub test()

Dim i As Long
Dim n As Long

For i = 2 To 17
* If Cells(i, 2) = Worksheets("Sheet4").Range("c4").Value Then *
Select Case i
Case "2"
Worksheets("Sheet1").Range("d35").Copy _
Destination:=Worksheets("Sheet4").Range("b8")


Case 3
Worksheets("Sheet1").Range("d35").Copy _
Destination:=Worksheets("Sheet4").Range("b13")

......

Case 17
Worksheets("Sheet1").Range("d35").Copy _
Destination:=Worksheets("Sheet4").Range("b73")


End Select

End If
Next

End Su
 
B

Bob Phillips

Good start, flame the forum!

I get past the code no problem. Are you sure there is a Sheet4, the values
are valid, etc.?

What error do you get.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top