|
-
Oct 16th, 2006, 06:57 PM
#1
Thread Starter
Addicted Member
[RESOLVED] combobox with consecutive dates ?
Hello,
Does anyone have a formula/function to take the current date and populate a combobox with this date and the 30 days after that ?
Thanks for any help...
-
Oct 16th, 2006, 07:12 PM
#2
Re: combobox with consecutive dates ?
Try something like this:
VB Code:
Private Sub PopulateCombo(combo As ComboBox)
Dim i As Long
For i = 0 To 30
combo.AddItem DateAdd("d", i, Date)
Next i
combo.ListIndex = 0
End Sub
Pete
No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.
-
Oct 22nd, 2006, 11:40 AM
#3
Thread Starter
Addicted Member
Re: combobox with consecutive dates ?
Thanks.... !
-
Oct 22nd, 2006, 11:47 AM
#4
Re: [RESOLVED] combobox with consecutive dates ?
alternatively you could avoid calls to DateAdd and do (in the loop):
-
Oct 22nd, 2006, 11:29 PM
#5
Re: [RESOLVED] combobox with consecutive dates ?
 Originally Posted by bushmobile
alternatively you could avoid calls to DateAdd and do (in the loop
Good call. Simple is better (usually) . Oh yeah, and about 60% faster too.
Pete
No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.
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
|