Results 1 to 3 of 3

Thread: date question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 1999
    Posts
    98
    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.

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658

    Wink 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!

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 1999
    Posts
    98
    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
  •  



Click Here to Expand Forum to Full Width