-
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.
-
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]
-
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.