Gurus,
I was trying to add a date picker on the userform.
I could not find the option in the title in additional control.
How do I resolve or get around this issue? Thank you!
Someone has put together a massive userform for picking dates.
Download the userform file from the source (and follow the instructions . . . which you probably know how to do, since it just involves importing the userform file into your VBA project).
Although it doesn't say it in the source, you need to (if you don't already) have the MSForms VBA reference checked. (You get to the following window by Tools -> References in the VBA window.)
There are SEVERAL optional parameters that you can pass, but here's the most basic parameter to pass to get you started.
VBA Code:
Sub Test()
Dim dateVariable As Date
dateVariable = CalendarForm.GetDate(FirstDayOfWeek:=Monday)
MsgBox dateVariable
End Sub
Where you need to call that test sub from somewhere other than the VBA code window. Like from your userform (maybe?). I definitely got it to work via the double click on a cell event in the worksheet code module.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.