A
Apprentice
I downloaded and imported the modules for the MonthCalendar from
http://www.lebans.com/monthcalendar.htm
I followed the instructions exactly but am getting an error when I try to
complie the inserted code. It hangs on the (mc, dtStart, dtEnd) and says
that "mc," is a variable not defined.
Here are the two lines of code in the form:
Private Sub Form_Load()
' Create an instance of our Class
Set mc = New clsMonthCal
' Set the hWndForm Property
mc.hWndForm = Me.hWnd
End Sub
.............................................................................
Private Sub AssignmentDate_DblClick(Cancel As Integer)
' Retrieve the currently selected date(s).
' Call our Function to display the Calendar
' Init the Calendar to select the date
' contained in this control.
Dim blRet As Boolean
Dim dtStart As Date, dtEnd As Date
dtStart = Nz(Me.AssignmentDate.Value, 0)
dtEnd = 0
blRet = ShowMonthCalendar(mc, dtStart, dtEnd)
If blRet = True Then
Me.AssignmentDate.Value = dtStart
Else
MsgBox "Hey - Did you forget to select a date?"
End If
End Sub
http://www.lebans.com/monthcalendar.htm
I followed the instructions exactly but am getting an error when I try to
complie the inserted code. It hangs on the (mc, dtStart, dtEnd) and says
that "mc," is a variable not defined.
Here are the two lines of code in the form:
Private Sub Form_Load()
' Create an instance of our Class
Set mc = New clsMonthCal
' Set the hWndForm Property
mc.hWndForm = Me.hWnd
End Sub
.............................................................................
Private Sub AssignmentDate_DblClick(Cancel As Integer)
' Retrieve the currently selected date(s).
' Call our Function to display the Calendar
' Init the Calendar to select the date
' contained in this control.
Dim blRet As Boolean
Dim dtStart As Date, dtEnd As Date
dtStart = Nz(Me.AssignmentDate.Value, 0)
dtEnd = 0
blRet = ShowMonthCalendar(mc, dtStart, dtEnd)
If blRet = True Then
Me.AssignmentDate.Value = dtStart
Else
MsgBox "Hey - Did you forget to select a date?"
End If
End Sub