Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Data Validation Calender Dropdown

Hi there,

Is it possible that, having created a dropdown menu listing dates fro
01/01/04 - 31/12/04, is it possible to programme excel so that th
dropdown menu will always open up on the current date?

Many thank

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Data Validation Calender Dropdown

The data validation list will default to the item that matches the
cell's value. You could use event code to automatically enter the
current date when the cell is selected.

For example, the following code enter the current date in cell D4. The
code should be stored on the worksheet module (right-click the sheet
tab, choose View Code, and paste the code where the cursor is flashing)--

'================================
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = "$D$4" _
And Target.Value = "" Then
Target.Value = Date
End If
Application.EnableEvents = True
End Sub
'============================

andyp161 < wrote:
Is it possible that, having created a dropdown menu listing dates from
01/01/04 - 31/12/04, is it possible to programme excel so that the
dropdown menu will always open up on the current date?


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

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
how to write in a dropdown data(Validation) [email protected] Excel Discussion (Misc queries) 2 January 3rd 10 02:41 PM
Data validation with dropdown list geotso Excel Discussion (Misc queries) 2 February 1st 09 05:59 PM
Dropdown lists from datavalidation. MichaelZ Excel Discussion (Misc queries) 3 October 21st 08 02:31 PM
Dynamic Data Series Selection from Data Validation Dropdown? Kris S Charts and Charting in Excel 1 May 23rd 08 11:17 PM
Widen Data Validation Dropdown Darren Hill[_2_] Excel Programming 4 December 7th 03 08:52 PM


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

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

About Us

"It's about Microsoft Excel"