|
-
May 8th, 2000, 06:37 PM
#1
Thread Starter
Lively Member
i am trying to add some dates to a combo box. i want to add all the dates from a week ago up to a month from now.
here's what i want to do basically:
For mydate = [a week ago] To [a month from now]
cboDate.AddItem (Format(mydate, "dddd, mmmm d yyyy"))
Next mydate
make sense? any help would be greatly appreciated. thanks a lot.
-
May 8th, 2000, 06:55 PM
#2
Fanatic Member
Not a problem
This should be basically what you are after.
Code:
Dim i As Integer
For i = -6 To 31
cboDate.AddItem (Format(DateAdd("d", i, Now), "dddd, mmmm d yyyy"))
Next i
Hope it helps.
[Edited by Iain17 on 05-09-2000 at 12:55 PM]
Iain, thats with an i by the way!
-
May 8th, 2000, 07:42 PM
#3
Thread Starter
Lively Member
thank you very much. you know when sometimes you ask a question and then when you see the answer you get that feeling like, "damn! i knew that! what was i thinking?" anyway, thanks for your help. everything works great.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|