M
Mercadogs
Hello World:
I pray you are doing great today!
My Question:
Is there a way to hide a pop-up calendar whenever the user clicks anywhere
outside of the calendar? Right now, I am using the code below, which whenever
the user clicks on this particular combo box, the calendar is shown. However,
the calendar doesn't disappear unless a date is selected from the calendar.
Beginning of Code:
Private Sub txt_DateCreated_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
Set cboOriginator = txt_DateCreated
If Not IsNull(cboOriginator) And cboOrinator <> "" Then
If MsgBox("Are you sure you want to update this date?",
vbYesNoCancel, "Click yes to update " & _
"date...") = vbYes Then
RequestDateCal.Visible = True
RequestDateCal.SetFocus
RequestDateCal.Value = cboOriginator.Value
Else
'txt_Date.SetFocus
End If
Else
RequestDateCal.Visible = True
RequestDateCal.SetFocus
RequestDateCal.Value = Date
End If
End Sub
'''End of Code
I pray you are doing great today!
My Question:
Is there a way to hide a pop-up calendar whenever the user clicks anywhere
outside of the calendar? Right now, I am using the code below, which whenever
the user clicks on this particular combo box, the calendar is shown. However,
the calendar doesn't disappear unless a date is selected from the calendar.
Beginning of Code:
Private Sub txt_DateCreated_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
Set cboOriginator = txt_DateCreated
If Not IsNull(cboOriginator) And cboOrinator <> "" Then
If MsgBox("Are you sure you want to update this date?",
vbYesNoCancel, "Click yes to update " & _
"date...") = vbYes Then
RequestDateCal.Visible = True
RequestDateCal.SetFocus
RequestDateCal.Value = cboOriginator.Value
Else
'txt_Date.SetFocus
End If
Else
RequestDateCal.Visible = True
RequestDateCal.SetFocus
RequestDateCal.Value = Date
End If
End Sub
'''End of Code