Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation, drop down list
I have a drop down list for the days of the year, form 1 jan 05 to 31 dec 05.
when I click on the drop down list, it always shows me 1 jan, then I have to scrol down and look for "today" date. is there any possibility that when I click on the drop down list to see the "today" date. I mean when use it today I see the date 16 Sep 05, and if I use it tomorrow I want to see 17 Sep 05 and so on. Your help is appreciated. Hoshyar |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation, drop down list
Private Sub Workbook_Open()
Worksheets(1).Range("H10").Value = Date End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code close your workbook, and open it again, and it should work. -- HTH Bob Phillips "Hoshyar" wrote in message ... I have a drop down list for the days of the year, form 1 jan 05 to 31 dec 05. when I click on the drop down list, it always shows me 1 jan, then I have to scrol down and look for "today" date. is there any possibility that when I click on the drop down list to see the "today" date. I mean when use it today I see the date 16 Sep 05, and if I use it tomorrow I want to see 17 Sep 05 and so on. Your help is appreciated. Hoshyar |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation, drop down list
Hi Bob,
Thanks, but it didn't work. My validation is in column "L" and the sourse of data is in column "W" and the name of the worksheet is (entrysheet). Do I need to change the name of the worksheet in this code. and Do have to change Range "H10" to Range "L1:L500".? Thanks for your patinece. Hoshyar "Bob Phillips" wrote: Private Sub Workbook_Open() Worksheets(1).Range("H10").Value = Date End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code close your workbook, and open it again, and it should work. -- HTH Bob Phillips "Hoshyar" wrote in message ... I have a drop down list for the days of the year, form 1 jan 05 to 31 dec 05. when I click on the drop down list, it always shows me 1 jan, then I have to scrol down and look for "today" date. is there any possibility that when I click on the drop down list to see the "today" date. I mean when use it today I see the date 16 Sep 05, and if I use it tomorrow I want to see 17 Sep 05 and so on. Your help is appreciated. Hoshyar |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation, drop down list
Yes, Change it to
Worksheets("entrysheet").Range("L1:L500").Value = Date -- HTH Bob Phillips "Hoshyar" wrote in message ... Hi Bob, Thanks, but it didn't work. My validation is in column "L" and the sourse of data is in column "W" and the name of the worksheet is (entrysheet). Do I need to change the name of the worksheet in this code. and Do have to change Range "H10" to Range "L1:L500".? Thanks for your patinece. Hoshyar "Bob Phillips" wrote: Private Sub Workbook_Open() Worksheets(1).Range("H10").Value = Date End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code close your workbook, and open it again, and it should work. -- HTH Bob Phillips "Hoshyar" wrote in message ... I have a drop down list for the days of the year, form 1 jan 05 to 31 dec 05. when I click on the drop down list, it always shows me 1 jan, then I have to scrol down and look for "today" date. is there any possibility that when I click on the drop down list to see the "today" date. I mean when use it today I see the date 16 Sep 05, and if I use it tomorrow I want to see 17 Sep 05 and so on. Your help is appreciated. Hoshyar |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation, drop down list
Hi Bob,
Many thanks, this is woking only when I click on the cell where a day is already inserted, then I see the same date is hilighted in the drop down list. In fact I want to see "today" date in an empty cell when I click on it. In other words, when I click on an empty cell I want to see the date of "today" highlited and to be fist on the list. this will save me time scrolling down looking for "today" date. Thanks for your help "Bob Phillips" wrote: Yes, Change it to Worksheets("entrysheet").Range("L1:L500").Value = Date -- HTH Bob Phillips "Hoshyar" wrote in message ... Hi Bob, Thanks, but it didn't work. My validation is in column "L" and the sourse of data is in column "W" and the name of the worksheet is (entrysheet). Do I need to change the name of the worksheet in this code. and Do have to change Range "H10" to Range "L1:L500".? Thanks for your patinece. Hoshyar "Bob Phillips" wrote: Private Sub Workbook_Open() Worksheets(1).Range("H10").Value = Date End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code close your workbook, and open it again, and it should work. -- HTH Bob Phillips "Hoshyar" wrote in message ... I have a drop down list for the days of the year, form 1 jan 05 to 31 dec 05. when I click on the drop down list, it always shows me 1 jan, then I have to scrol down and look for "today" date. is there any possibility that when I click on the drop down list to see the "today" date. I mean when use it today I see the date 16 Sep 05, and if I use it tomorrow I want to see 17 Sep 05 and so on. Your help is appreciated. Hoshyar |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
validation list with drop down list of options?? | Excel Worksheet Functions | |||
Data Validation using List (But needs unique list in drop down lis | New Users to Excel | |||
Validation (Drop down list vs simple text length validation) | Excel Programming | |||
Validation (Drop down list vs simple text length validation) | Excel Programming | |||
Validation (Drop down list vs simple text length validation) | Excel Programming |