Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim cboOriginator2 As ComboBox
Private Sub ocxCalendar2_Click()
' Copy chosen date from calendar to originating combo box
Me.Recalc
Do Until Weekday(ocxCalendar2.Value) = 2
ocxCalendar2.Value = ocxCalendar2.Value - 1
Loop
cboOriginator2.Value = ocxCalendar2.Value
' Return the focus to the combo box and hide the calendar and
cboOriginator2.SetFocus
ocxCalendar2.Visible = False
Set cboOriginator2 = Nothing
End Sub
Private Sub StartDate_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Set cboOriginator2 = StartDate
' Unhide the calendar and give it the focus
ocxCalendar2.Visible = True
ocxCalendar2.SetFocus
' Match calendar date to existing date if present or today's date
If Not IsNull(StartDate) Then
ocxCalendar2.Value = cboOriginator2.Value
Else
ocxCalendar2.Value = Date
End If
End Sub