Display current date on excel calendar

Prevost

Board Regular
Joined
Jan 23, 2014
Messages
198
Hi There,

I have read some posts but I am still unsure about this. I have a macro on my sheet that runs whenever I double click certain cells. The calendar pops up and I can select a date from that calendar. Now I know that the calendar date defaults to whenever the calendar was created, instead of today's date. I would like the calendar to display today's current date as it makes the selection much easier. Now I have a few questions...

1. Where do I insert the code to have the calendar display the current date? I have code in the sheet, form and module...
2. Do I have to use the name of the calendars or are they defaulted to Calendar1, Calendar2 etc...

I think that should get me going. I am sorry if this is repeating but I was unclear from the posts that I read.

Any help is greatly appreciated. Thanks!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi Karim,
I am not sure what you mean by Activate event. I have code on my sheet that says when a certain range of cells is double clicked, my procedure titled 'EnterDateMultipleCells' is called from a module. My module code is

Code:
Sub EnterDateMultipleCells()
    frmEnterCalendarMultipleCell.Show
End Sub

'frmEnterCalendarMultipleCell.Show' is under Forms. The code on that form is

Code:
'This code was inserted automatically when I generated the calendar

Private Sub cmdClose_Click()
    Unload Me
End Sub

Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
   On Error Resume Next
   Dim cell As Object
   For Each cell In Selection.Cells
      cell.Value = DateClicked
   Next cell
   Unload Me
End Sub

I would assume that it would be in the Form section where I would enter in your suggested code?

Thanks
 
Upvote 0
Do I have to declare my calendar's name? As in Me.MyCalendarsName.Value=Date...when I put that code in my form..either as an Activate or Initialize...it results in an error. I am sure I am just missing something simple here.
Thanks.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top