Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date event macro. Help!


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

--
lv61
-----------------------------------------------------------------------
lv619's Profile: http://www.excelforum.com/member.php...fo&userid=1868
View this thread: http://www.excelforum.com/showthread.php?threadid=56226

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Date event macro. Help!

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)

"lv619" wrote in
message ...

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

Now, I have a cell renge of "B2:R2" which contain a series of dates to
which my workbook needs to be updated (i.e. copy data from one sheet to
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 with
my code below (or if you could suggest a better process from my
problem).

I'm receiving a run time error where i have highlighted below, so
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 Sub


--
lv619
------------------------------------------------------------------------
lv619's Profile:

http://www.excelforum.com/member.php...o&userid=18684
View this thread: http://www.excelforum.com/showthread...hreadid=562267



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Event Macro running another macro inside K1KKKA Excel Discussion (Misc queries) 1 December 20th 06 08:21 PM
Date Doubleclick Event PG Oriel Excel Programming 2 February 14th 06 11:49 AM
I had template that when you changed date of the event, it automa. BJSilkwood Excel Worksheet Functions 1 April 16th 05 07:57 PM
Date Event gregork Excel Programming 3 February 22nd 05 10:26 AM
Date/Time Picker Event Won't Fire Mark Driscol Excel Programming 1 July 14th 04 03:28 PM


All times are GMT +1. The time now is 05:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"