Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Drop down calendar function

I am creating a spreadsheet and would like to include a drop down menu with a
calendar format to avoid typing the date longhand. Can anyone suggest how
this is done ?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 136
Default Drop down calendar function

Hi Piers,

You can do this with a macro..

Right click on the icon nex to File in the menu bar at the top of the
screen, select the sheet where you want the calender from the options on the
left.

Paste this into there...

Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "dd/mm/yyyy"
ActiveCell.Select
If Calendar1.Value Then
Calendar1.Visible = False
End If

End Sub


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("A1:A5"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If


End Sub


Change the range ("A1:A5") at this line to fit your requirements...

If Not Application.Intersect(Range("A1:A5"), Target) Is Nothing Then

Hope this helps,

Gav.
"Piers" wrote:

I am creating a spreadsheet and would like to include a drop down menu with a
calendar format to avoid typing the date longhand. Can anyone suggest how
this is done ?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,123
Default Drop down calendar function

See also
http://www.rondebruin.nl/calendar.htm

--

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


"Piers" wrote in message ...
I am creating a spreadsheet and would like to include a drop down menu with a
calendar format to avoid typing the date longhand. Can anyone suggest how
this is done ?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop Down Calendar ? James Excel Worksheet Functions 1 September 28th 07 10:39 PM
How do I put a calendar in a drop down box? Debra Dalgleish Excel Worksheet Functions 0 November 30th 06 07:20 PM
drop-down calendar lizbeff Excel Worksheet Functions 4 October 5th 06 12:07 AM
Calendar on drop down rexmann Excel Discussion (Misc queries) 2 August 1st 06 05:04 PM
how do I add a calendar function to excel as a drop down? Dennis Excel Worksheet Functions 1 May 26th 05 07:13 PM


All times are GMT +1. The time now is 04:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"