EXCEL VIDEO TUTORIALS / EXCEL DASHBOARD REPORTS

Ozgrid, Experts in Microsoft Excel Spreadsheets

Excel Calendar

 

Excel Calendar Control-Create an Excel Calendar

Back to: Excel VBA . Got any Excel/VBA Questions? Free Excel Help

ALSO SEE: Create Worksheet Calendar || Calendar for Excel || Excel Date and Times || Convert Excel Date Formats

Excel Calendar. One very common problem encountered by most Excel users is the correct entering of Excel dates When a date is not entered in the correct format Excel will not recognize it as a valid date. This often means you can not perform calculations with the 'so-called' dates. It also means any charts, Pivot tables etc based off the dates will not be valid. While the use of Excels Validation can help with this it is far from bullet proof. Below is a quite simple way we can have all our dates entered in Excel correctly.  Just follow the steps and you will be up and running in 10 minutes. Download Demo Or Download Advanced Demo where you can add x days, months and years to any date.

  1. Open the workbook for the calendar.  It is a good idea to use your Personal.xls for this, in which case you should first go to Window>Unhide
  2. Go to Tools>Macro>Visual Basic Editor (Alt+F11).
  3. Go to Insert>UserForm from within the VBE. This should automatically display the Control Toolbox, if not go to View>Toolbox
  4. Right click on the Toolbox and select Additional Controls
  5. Scroll through the list until you see: Calendar Control 10.0 (number will differ depending on Excel version) and check the checkbox and click OK
  6. Now click the Calendar that is now part of the Toolbox and then click on the UserForm we inserted in step 3.
  7. Use the Size Handles on both the UserForm and the Calendar Control to make them both a reasonable size. See Example below.
 
  1. Now ensure the UserForm is selected (as shown above) then go to View>Properties Window (F4)
  2. Select Caption from the Properties Window and replace: UserForm1 with the word Calendar.
  3. Now go to View>Code (F7) and in the white Private Module in front of you, add the code exactly as show below:
Private Sub Calendar1_Click()

ActiveCell = Calendar1.Value

	ActiveCell.NumberFormat="mm/dd/yy"

End Sub

	

Private Sub UserForm_Activate()

Me.Calendar1.Value = Date

End Sub
  1. Now go to Insert>Module and in this Public Module place this code
Sub ShowIt()

UserForm1.Show

End Sub
  1. Ok, nearly done. Click the top right X (or push Alt+F11) to return back to Excel.
  2. Go to Tools>Macro>Macros (Alt+F8) and then select ShowIt click Options and assign a shortcut key and you're done.

Download Demo Or Download Advanced Demo where you can add x days, months and years to any date.

All you need to do now is push your shortcut key and the Calendar will show with today's date as the default. Click any date and it will be inserted into the active cell. This ensures that any date entered is valid and it is a lot easier for the user.

If you do not have this Control, go here and scroll down to "Office Calendar Control Not Working"

ALSO SEE: Calendar for Excel || Excel Date and Times || Convert Excel Date Formats

Excel Dashboard Reports & Excel Dashboard Charts 50% Off Become an ExcelUser Affiliate & Earn Money

Special! Free Choice of Complete Excel Training Course OR Excel Add-ins Collection on all purchases totaling over $64.00. ALL purchases totaling over $150.00 gets you BOTH! Purchases MUST be made via this site. Send payment proof to special@ozgrid.com 31 days after purchase date.



Instant Download and Money Back Guarantee on Most Software

EXCEL VIDEO TUTORIALS / EXCEL DASHBOARD REPORTS

Excel Trader Package Technical Analysis in Excel With $139.00 of FREE software!

Microsoft and Microsoft Excel are registered trademarks of Microsoft Corporation. OzGrid is in no way associated with Microsoft

Some of our more popular products are below...
Convert Excel Spreadsheets To Webpages | Trading In Excel | Construction Estimators | Finance Templates & Add-ins Bundle | Code-VBA | Smart-VBA | Print-VBA | Excel Data Manipulation & Analysis | Convert MS Office Applications To...... | Analyzer Excel | Downloader Excel | MSSQL Migration Toolkit | Monte Carlo Add-in | Excel Costing Templates