Using the date picker
Once the CalendarForm
date picker has been imported into your workbook, it
can be used by calling the CalendarForm.GetDate
function. The
GetDate
function is the single point of entry into the date picker. It
controls everything. Every argument in the function is optional, meaning your function
call an be as simple as dateVariable = CalendarForm.GetDate
. That's all there
is to it. The date picker initializes and pops up, the user selects a date, and the
selection is returned to your variable.
Dim dateVariable as Date
dateVariable = CalendarForm.GetDate
From there, you can use as many or as few arguments as you want in order to get the
desired calendar that suits your needs. Below are some examples of different calendars you
can get from the various arguments in the GetDate
function.
All default values are also set in the GetDate function, so if you want to change default
colors or behavior without having to explicitly do so in every function call, you can set
those values in the argument list for the function. By setting the various arguments, you
can obtain vastly different calendars, all with the same function.