ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   display Calendar for Excel field entry? (https://www.excelbanter.com/excel-worksheet-functions/41861-display-calendar-excel-field-entry.html)

John Paul

display Calendar for Excel field entry?
 
Using Excel 2003 I'm building a Form Spreadsheet that many dates need to be
entered by users. Instead of keying each date how do I display a calendar
for spread sheet cell for user to point & click the date they want entered?

Duke Carey

Go to the Control toolbox (View-Toolbars), click on the bottom right icon on
the panel (looks like a crossed hammer & wrench) and scroll down and select
the Calendar Control. Then draw it on your spreadsheet

Note: You'll need to draw it at the very top of the sheet & then freeze the
panes so that it's in view all the time. Also, you'll have to attach code to
the calendar to put the selected date into a cell. The problem is, what
cell?

Your users will most likely have to select the target cell first, then
double-click the desired date.

You can use this simple code:

Private Sub Calendar1_DblClick()
With ActiveCell
.Value = Me.Calendar1.Value
.NumberFormat = "mm/dd/yy"
.Select
End With
End Sub

attach it by right clicking on the calendar and selecting View Code


"John Paul" wrote:

Using Excel 2003 I'm building a Form Spreadsheet that many dates need to be
entered by users. Instead of keying each date how do I display a calendar
for spread sheet cell for user to point & click the date they want entered?


Ron de Bruin

Another option is this
http://www.rondebruin.nl/calendar.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Duke Carey" wrote in message ...
Go to the Control toolbox (View-Toolbars), click on the bottom right icon on
the panel (looks like a crossed hammer & wrench) and scroll down and select
the Calendar Control. Then draw it on your spreadsheet

Note: You'll need to draw it at the very top of the sheet & then freeze the
panes so that it's in view all the time. Also, you'll have to attach code to
the calendar to put the selected date into a cell. The problem is, what
cell?

Your users will most likely have to select the target cell first, then
double-click the desired date.

You can use this simple code:

Private Sub Calendar1_DblClick()
With ActiveCell
.Value = Me.Calendar1.Value
.NumberFormat = "mm/dd/yy"
.Select
End With
End Sub

attach it by right clicking on the calendar and selecting View Code


"John Paul" wrote:

Using Excel 2003 I'm building a Form Spreadsheet that many dates need to be
entered by users. Instead of keying each date how do I display a calendar
for spread sheet cell for user to point & click the date they want entered?





All times are GMT +1. The time now is 05:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com