Hello,
First of all thanks to "bsmith" for getting me started. I have now got the dates reading into the combo box, but after each date in the list appear two characters that look like two bold |'s, (ie) 01 Jan II etc...
Is there any way I can get rid of these, to be able to just show the dates (ie) 01 Jan
Below is the code I am using and also my original problem:
Hope someone can help...
Thanks,
Andy............
Original Problem...Code:Private Function PopulateDates(strForYear As String) Dim dtStartDate As Date Dim dtCurrentDate As Date Dim strForYear2 dtStartDate = CDate("01/01/" & strForYear) dtCurrentDate = dtStartDate Do While strForYear = Format(dtCurrentDate, "yyyy") Combo1.AddItem strForYear2 & Format(dtCurrentDate, "dd mmm ") & vbCrLf dtCurrentDate = dtCurrentDate + 1 Loop End Function Private Sub Command1_Click() PopulateDates (2000) End Sub
Is there any possible way that you can use an array or something like it to fill a list box with all the possible dates of the year, with just the date and month and not the year????
(ie) having it automatically display 1st January til 31st December...without the year being shown...????
Hope someone can help...
Thanks,
Andy............




Reply With Quote