Got any Excel/VBA Questions? Free Excel Help
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.
Private Sub Calendar1_Click() ActiveCell = Calendar1.Value ActiveCell.NumberFormat="mm/dd/yy" End Sub Private Sub UserForm_Activate() Me.Calendar1.Value = Date End Sub
Sub ShowIt() UserForm1.Show End Sub
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"
See also:
Create a Worksheet Calendar |
Excel: Convert Currency Number to Words/Text |
Free Training Course: Lesson 1 - Excel Fundamentals
See also: Index to Excel VBA Code; Index to Excel Freebies; Lesson 1 - Excel Fundamentals; Index to how to… providing a range of solutions
Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.