VBA- Add Date Picker in Userforms
VBA- Add Date Picker in Userforms
Option 1 | Check if ability already exists | 2 minutes
Open VB Editor
Tools -> Additional Controls
Select "Microsoft Monthview Control 6.0 (SP6)" (if applicable)
Use 'DatePicker' control for VBA Userform
Option 2 | The "Monthview" Control doesn't currently exist | 5 minutes
Close Excel
Download MSCOMCT2.cab (it's a cabinet file which extracts into two useful files)
Extract Both Files | the .inf file and the .ocx file
Install | right-click the .inf file | hit "Install"
Move .ocx file | Move from "C:\Windows\system32" to "C:\Windows\sysWOW64"
Run CMD | Start Menu -> Search -> "CMD.exe" | right-click the icon | Select "Run as administrator"
Register Active-X File | Type "regsvr32 c:\windows\sysWOW64\MSCOMCT2.ocx"
Open Excel | Open VB Editor
Activate Control | Tools->References | Select "Microsoft Windows Common Controls 2-6.0 (SP6)"
Userform Controls | Select any userform in VB project | Tools->Additional Controls
Select "Microsoft Monthview Control 6.0 (SP6)"
Use 'DatePicker' control for VBA UserForm
Okay, either of these two steps should work for you if you have Office 2013 (32-Bit) on Windows 7 (x64). Some of the steps may be different if you have a different combo of Windows 7 & Office 2013.
The "Monthview" control will be your fully fleshed out 'DatePicker'. It comes equipped with its own properties and image. It works very well. Good luck.
Site: "bonCodigo" from above (this is an updated extension of his work)
Site: "AMM" from above (this is just an exension of his addition)
Site: Various Microsoft Support webpages

Comments
Post a Comment