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.
Option Explicit
Dim dDate As Date ' Used to store date returned from Calendar
Private Sub CommandButton1_Click()
UserForm2.Show
' Sets the variable dDate equal to the selected date
dDate = UserForm2.dUserDate
' Free memory
Unload UserForm2
End Sub
Option Explicit
Dim dSelectedDate As Date ' Date selected by user
Property Get dUserDate()
dUserDate = dSelectedDate
End Property
Sub Calendar1_Click()
dSelectedDate = Calendar1.Value
UserForm2.Hide
End Sub
Private Sub UserForm_Initialize()
' Initializes the calendar control to todays date
Calendar1.Value = Date
End Sub