BLOGS BY TOPIC
BLOGS BY AUTHOR
BLOGS BY YEAR
Posted by Andy Brown on 13 January 2014
You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
Using the Excel Calendar Control from Excel 2010 onwards
I've previously blogged about how to use the calendar control to allow a user to pick dates in an Excel form, but users of Excel 2010 onwards may struggle to find this useful control!
Picking a date using the calendar control - but where's it gone in Excel 2010 onwards? This is particularly important if your company upgrades from Excel 2003/2007 to 2010/2013.
The answer is given in this Microsoft forum, but is also reproduced below for convenience.
Downloading and registering the MSCOMCT2.OCX file
This is the name of the file containing the calendar control. The first thing to do is to download this from here. If you then right-click on the files in the zipped file downloaded, you should be able to extract them into a folder of your choice (it doesn't matter which at this stage):
Select the files in the CAB zipped file, right-click and extract them to a suitable folder.
You can now register your control. To do this, you have to be an administrator:
Go to Programs from the Windows Start button, right-click on the Command Prompt in the Accessories group and choose to run it as an administrator.
Change directory to the one to which you extracted the control files:
Use the cd command as shown to change the current folder.
Type in this command:
You should see a successful registration message when you press the ENTER key:
You can now close down the command prompt window.
Accessing the Calendar Control
I've found it hard to test this, because all of our computers have multiple versions of Excel installed, but I believe that you should be able to right-click on the UserForm toolbox in VBA to add the calendar control as an additional control:
Right-click on the VBA user form toolbox, and choose the option shown to reference the newly installed calendar control.
If anybody could confirm that this works on a computer running only Excel 2010 or 2013 via a comment, I'd be grateful!