Stephen Lebans' MonthCalender

L

Lizba

Hi there all,
I have been using Leban's wonderful monthcalender very successfully
for a while now. However, I now have a form which needs to have the
calender attached to two different controls on the same form. One is
BookingDate_DblClick and the other is cmdDateRange_Click(). I have
changed the code on the bookingdate control to read:

Private Sub BookingDate_DblClick(Cancel As Integer)
Dim blRet As Boolean
Dim dtBooked As Date

dtBooked = Nz(Me.BookingDate.Value, 0)

blRet = ShowMonthCalendar(mc, dtBooked)
If blRet = True Then
Me.BookingDate = dtBooked
Else
' Add any message here if you want to
' inform the user that no date was selected
End If

End Sub

and have kept the 'cmdDateRange exactly as in Leban's code.

The problem I am having is that neither control will open the calender
properly. It seems to do it eventually but the program goes into a
form of suspended animation for a long time first.

Can anyone offer any advice
thanks
Lizba
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top