ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   drop down date (https://www.excelbanter.com/excel-worksheet-functions/203444-drop-down-date.html)

kalasha

drop down date
 
i am trying to enter a drop down date in an excel worksheet for users to
select a date from a calander.

ex. select a cell (where the date is to be) and a calander pops up and the
user selects the date from the calander.

thank you,



Gord Dibben

drop down date
 
http://www.rondebruin.nl/calendar.htm


Gord Dibben MS Excel MVP

On Mon, 22 Sep 2008 12:20:06 -0700, kalasha
wrote:

i am trying to enter a drop down date in an excel worksheet for users to
select a date from a calander.

ex. select a cell (where the date is to be) and a calander pops up and the
user selects the date from the calander.

thank you,



NoodNutt

drop down date
 
Kalasha

Right click on the sheeta tab and copy this code in:

Change the range to suit your requirements

Dim CurrentDTPickerCell As Range

Private Sub DTPicker1_CloseUp()
CurrentDTPickerCell.Value = DTPicker1.Value
DTPicker1.Visible = False
End Sub

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Not Intersect(Target, Range("F5:F2004")) Is Nothing Then
Cancel = True
Set CurrentDTPickerCell = Target
DTPicker1.Visible = True
DTPicker1.Top = Target.Top
DTPicker1.Left = Target.Left + Target.Width + 1
End If
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("F5:F2004")) Is Nothing Then
If DTPicker1.Visible Then DTPicker1.Visible = False
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If DTPicker1.Visible Then DTPicker1.Visible = False
End Sub


In the Insert Controls Menu, choose Date/Time Picker and insert it anywhere
on your sheet.

Double click on the cell(s) or any cell within the range you have specified
in the code and click on the arrow down to bring up the callendar.

HTH
Mark.



Tanya[_3_]

drop down date
 
great
"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
http://www.rondebruin.nl/calendar.htm


Gord Dibben MS Excel MVP

On Mon, 22 Sep 2008 12:20:06 -0700, kalasha
wrote:

i am trying to enter a drop down date in an excel worksheet for users to
select a date from a calander.

ex. select a cell (where the date is to be) and a calander pops up and
the
user selects the date from the calander.

thank you,






All times are GMT +1. The time now is 08:34 PM.

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