Calendar Object in Excel

  • Thread starter Calendar Object in Excel
  • Start date
C

Calendar Object in Excel

I was trying to insert a Calendar object in Excel. click on a button and a
calendar opens. Select the date and that date is inserted in the active cell.
found an example on the net : calendar.xls. But it works erratically. Tried
with changing macro security, including the right Addin. Also added the
activex control. No. But the problem persists. The moot question is: if I do
not use the example on the net and try inserting that on my own: on VBA
editor insert userform... and then cannot find the control... please help.
 
L

Luke M

Under Insert - Object, you can insert a calendar object. Next, right click on
the sheet tab, view code. From the first dropdown, change this to your
calendar. Make sure second dropdown is on 'Click". Then, inside the Macro it
creates for you, write have a range return the value. Example:

Private Sub Calendar1_Click()
Range("A1").Value = Calendar1.Value
End Sub

'Now, create another macro like this:
Sub ShowCalendar()
Calendar1.Visible = Not (Calendar1.Visible)
End Sub

Create your button with assigned macro "ShowCalendar" to toggle the calendar
display on/off. For ease of use, I'd recommend placing the button & calendar
in an area of your worksheet that will always be visible.
 
J

John

Hi
I've got one,that work's differently if you're interested.
You select the date first, a second popup will ask for the cell location.It's
confusing at first if you've use the other one, but you adapt quickly.
What 's really different is that it will stay open, you can move it around and
you can enter multiple date on different sheets if you like. to close you press
a button on the calendar.
Post back if you want it.
HTH
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top