Copy and paste this code in your form's class module. (Forgive me if you already know this, but to get to that, just click the little window with the blue, yellow and red dashes around its edge in the toolbar.)
Code:
Private Sub Form_Load()
Me.Combo2.RowSourceType = "value list"
Me.Combo2.RowSource = Date & ";" & Date + 1 & ";" & Date + 2 & ";" & Date + 3 & ";" & Date + 4 & ";" & Date + 5 _
& ";" & Date + 6 & ";" & Date + 7
End Sub
Of course, if you don't want a date to show, but a day, then you can format the date as in:
Code:
format(date,"dddd") & ";" & format(date+1,"dddd")
which will show
Tuesday
Wednesday...etc in your combo box
instead of
2/6/01
2/7/01...etc
The possibilities are endless. Best of success s-)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.