C
Chaster
I have downloaded the A2K verzion of Mr. Lebans calendar progarm but am
having problems implementing it with my fields. I have also imported his
forms into my project and his program works fine when using his forms so I
don't believe it is a reference problem
http://www.lebans.com/monthcalendar.htm
I am using his exact same code but on the dblclick of one of my controls I
am getting
ERROR: ByRef Argument Type Mismatch
Private Sub ExpecetedArrivalDay_DblClick(Cancel As Integer)
' Retreive the currently selected date(s).
' Call our Function to display the Calendar
Dim DateStart As Date
Dim DateEnd As Date
' If we want the range of dates selected by the user
' we have to supply 2 empty Date variables.
' These 2 variables will be filled in and returned
' by the ShowMonthCalendar function
' Init a Date Range based on the current date in this
' control plus 7 days.
' If the control is NULL then use Todays date.
DateStart = Nz(txtDateLong, Date)
DateEnd = DateStart + 7
'txtDateLong = ShowMonthCalendar(DateStart, DateEnd, , Me.hWnd)
' Use named parameters for clarity
txtDateLong = ShowMonthCalendar(clsMC:=mc, StartSelectedDate:=DateStart, _
*********** The code stops on the above "mc" after the = and gives me the
above mentioned error
EndSelectedDate:=DateEnd, hWndForm:=Me.hWnd)
Me.TxtDateRangeStart = DateStart
Me.txtDateRangeEnd = DateEnd
End Sub
Any ideas what may be happeing here?
TIA
http://www.lebans.com/monthcalendar.htm
having problems implementing it with my fields. I have also imported his
forms into my project and his program works fine when using his forms so I
don't believe it is a reference problem
http://www.lebans.com/monthcalendar.htm
I am using his exact same code but on the dblclick of one of my controls I
am getting
ERROR: ByRef Argument Type Mismatch
Private Sub ExpecetedArrivalDay_DblClick(Cancel As Integer)
' Retreive the currently selected date(s).
' Call our Function to display the Calendar
Dim DateStart As Date
Dim DateEnd As Date
' If we want the range of dates selected by the user
' we have to supply 2 empty Date variables.
' These 2 variables will be filled in and returned
' by the ShowMonthCalendar function
' Init a Date Range based on the current date in this
' control plus 7 days.
' If the control is NULL then use Todays date.
DateStart = Nz(txtDateLong, Date)
DateEnd = DateStart + 7
'txtDateLong = ShowMonthCalendar(DateStart, DateEnd, , Me.hWnd)
' Use named parameters for clarity
txtDateLong = ShowMonthCalendar(clsMC:=mc, StartSelectedDate:=DateStart, _
*********** The code stops on the above "mc" after the = and gives me the
above mentioned error
EndSelectedDate:=DateEnd, hWndForm:=Me.hWnd)
Me.TxtDateRangeStart = DateStart
Me.txtDateRangeEnd = DateEnd
End Sub
Any ideas what may be happeing here?
TIA
http://www.lebans.com/monthcalendar.htm