Calendar

  • Thread starter Thread starter Dewi...
  • Start date Start date
D

Dewi...

Had some nice code off a magazine to make the calendar

The code only allows you to do one date at a time, it would be nice if
you could just click on a cell and then click a date as often as you
want. Quicker to do Ctrl and Colon and then edit the dates as it is.

Here is the code
this is the forms
-----------------------------------------------------------
Private Sub Calendar1_Click()
ActiveCell = Calendar1.Value
End Sub


Private Sub userform1_activate()
Me.Calendar1.Value = Date
End Sub
----------------------------------------------
then to make it show

Sub ShowCalendar()
Calendar.Show
End Sub
 
Ron,

The link below worked well. I have an additional question. How do I tell
Excel to display the calendar when a particular cell is clicked? It is
almost like data validation... I don't want the user to click a button, would
just like the calendar to be displayed on cells that require dates.

Thanks - Ben

Ron de Bruin said:
 
Hi Ben

The code on my site is doing what you want
If you use the userform example you can also use the selection change event to
open the userform when you click on a cell.

See de code on my page how I run code when I select a cell in a range

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


Ben said:
Ron,

The link below worked well. I have an additional question. How do I tell
Excel to display the calendar when a particular cell is clicked? It is
almost like data validation... I don't want the user to click a button, would
just like the calendar to be displayed on cells that require dates.

Thanks - Ben
 

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

Back
Top