I have labels--H0 thru H11 and they all show a month name. However with the code i have it does'nt work properly. I want H0 to Show the month name for instance Nov--then when the month changes i want it to advance down and show the current month now--Dec. and each month the month in H11 will go to H0
H0---Nov
H1---Dec
H2---Jan
H3---Feb
thru H11
Private Sub Form_Load()
Dim MonthPart As Integer
Dim i As Integer
MonthPart = Month(Date)
For i = 0 To 11
Monlbl(i).Caption = UCase(MonthName((21 + i - MonthPart) Mod 12 + 1, True))
Next
Text1.Text = Format(Date, "yyyy")
End Sub
Thank you in advance....Brian
H0---Nov
H1---Dec
H2---Jan
H3---Feb
thru H11
Private Sub Form_Load()
Dim MonthPart As Integer
Dim i As Integer
MonthPart = Month(Date)
For i = 0 To 11
Monlbl(i).Caption = UCase(MonthName((21 + i - MonthPart) Mod 12 + 1, True))
Next
Text1.Text = Format(Date, "yyyy")
End Sub
Thank you in advance....Brian