1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Option Explicit
Private WithEvents theCal As cCalendar
Private Sub CommandButton1_Click()
theCal.Today
End Sub
Private Sub theCal_AfterUpdate()
Me.Label1.Caption = theCal.Value
End Sub
Private Sub UserForm_Initialize()
Set theCal = New cCalendar
theCal.BackColor = RGB(255, 255, 255)
theCal.SelectedBackColor = RGB(220, 255, 220)
theCal.HeaderBackColor = RGB(240, 240, 80)
theCal.SaturdayBackColor = RGB(230, 230, 230)
theCal.SundayBackColor = RGB(230, 230, 255)
theCal.MonthLength = mlLocalLong
theCal.Add_Calendar_into_Frame Me.Frame1
End Sub |