Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 30
Default can I create a drop down list to pick a date ?

I have a column that I wish to have the date posted in. I would like to use
a DROP DOWN LIST with a calendar to let the user pick the date needed. I
would like the calendar to appear for the current MONTH/YEAR when the drop
down arrow is picked, with the option to move foreard or back month by month.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 257
Default can I create a drop down list to pick a date ?

I don't do this much, but it seems to me if you want to use an ActiveX object
you have to do it with VBA programming. but someone here may be able to show
you another way.

--- "Retired Bill" wrote:
I have a column that I wish to have the date posted in. I would like to use
a DROP DOWN LIST with a calendar to let the user pick the date needed. I
would like the calendar to appear for the current MONTH/YEAR when the drop
down arrow is picked, with the option to move foreard or back month by month.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default can I create a drop down list to pick a date ?

Say we are using column B.

First put a calendar control on the worksheet:

Insert Object... Calendar Control (will have some number with it)

Next insert the following macros in teh worksheet code area:

Private Sub Calendar1_DblClick()
ActiveCell.NumberFormat = "m/d/yyyy"
ActiveCell = Calendar1
End Sub

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)

If Target.Column = 2 Then
Cancel = True
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Else
Cancel = False
Calendar1.Visible = False
End If
End Sub

Double click on column B to make the tool appear
Double click in the tool to pick a date
Double click off column B to make the tool vanish

Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm

and

http://groups.google.com/group/micro...ab3aff113b e3


--
Gary''s Student - gsnu200840


"Retired Bill" wrote:

I have a column that I wish to have the date posted in. I would like to use
a DROP DOWN LIST with a calendar to let the user pick the date needed. I
would like the calendar to appear for the current MONTH/YEAR when the drop
down arrow is picked, with the option to move foreard or back month by month.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default can I create a drop down list to pick a date ?

Thanks, I shall give it a try. Appreciate your time----------

"Gary''s Student" wrote:

Say we are using column B.

First put a calendar control on the worksheet:

Insert Object... Calendar Control (will have some number with it)

Next insert the following macros in teh worksheet code area:

Private Sub Calendar1_DblClick()
ActiveCell.NumberFormat = "m/d/yyyy"
ActiveCell = Calendar1
End Sub

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)

If Target.Column = 2 Then
Cancel = True
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Else
Cancel = False
Calendar1.Visible = False
End If
End Sub

Double click on column B to make the tool appear
Double click in the tool to pick a date
Double click off column B to make the tool vanish

Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm

and

http://groups.google.com/group/micro...ab3aff113b e3


--
Gary''s Student - gsnu200840


"Retired Bill" wrote:

I have a column that I wish to have the date posted in. I would like to use
a DROP DOWN LIST with a calendar to let the user pick the date needed. I
would like the calendar to appear for the current MONTH/YEAR when the drop
down arrow is picked, with the option to move foreard or back month by month.

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
Pick From Drop-Down List... Mary Z Excel Worksheet Functions 3 April 18th 07 06:58 PM
Drop Down Pick List mickey Excel Discussion (Misc queries) 3 January 30th 07 07:26 PM
how do i get a drop down pick list in a cell andrew openshaw Excel Worksheet Functions 0 March 2nd 06 03:28 PM
how do i get a drop down pick list in a cell bpeltzer Excel Worksheet Functions 0 March 2nd 06 03:26 PM
Pick from a drop-down list Matilda Excel Worksheet Functions 1 February 20th 06 08:06 PM


All times are GMT +1. The time now is 08:30 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"