Excel – How to add Calendar, Date-Picker

excelexcel-2013vba

I need to add a Calendar Date Picker in Excel 2013.

I found that the MonthView and the DT Picker are no longer in the ActiveX menu and the links for a CAB file that supposedly contains these does not work. There are instruction documents, but they rely on a control that doesn't exist.

I have an Excel Addin that does what I want, but I want to do this with VBA rather than install the Addin on every machine that will use this.

Best Answer

Once you have registered the mscomct2.ocx control (YOU WILL NEED TO REGISTER THIS FILE ON ALL COMPUTERS THAT WILL USE THIS WORKBOOK!), you can either add one of below controls in the Worksheet or in a UserForm:

  • Date and Time Picker (DTPicker), left/top of screenshots
  • MonthView, right/bottom of screenshots

WORKSHEET (ActiveX)

  1. In Developer tab, Controls group, click Insert, then bottom right button for More Controls.
    Step1
  2. Scroll down and select Microsoft Date and Time Picker Control 6.0 (SP6) or Microsoft MonthView Control 6.0 (SP6) then click OK.
    Step2a | Step2b
  3. When you are out of Design Mode, clicking on the DTPicker control is like this, while the MonthView takes more space:
    Step3a | Step3b

UserForm

  1. In the Toolbox for the UserForm selected, right click on empty space of the Controls tab, click Additional Controls
    form step 1
  2. Scroll down and tick Microsoft Date and Time Picker Control 6.0 (SP6) or Microsoft MonthView Control 6.0 (SP6):
    form step 2a | form step 2b
  3. Now the controls are in your Controls tab to add on UserForms
    form step 3
  4. Default size of the controls on UserForm:
    form step 4


In either way, you will need to implement the actions when you click on these controls.

Related Topic