Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
current date
Hi All
I use Excel 2003 SP2 and have two question: 1. I try to set function "=year(date())" in control source property of a textbox but I recive an error to use invalid property why? 2. I need get current date and minus 20 days and show it in a textbox with this formt 04-JAN-2009? Thanks in advance Bijan |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
current date
On Sun, 4 Jan 2009 08:17:01 -0800, bijan
wrote: Hi All I use Excel 2003 SP2 and have two question: 1. I try to set function "=year(date())" in control source property of a textbox but I recive an error to use invalid property why? 2. I need get current date and minus 20 days and show it in a textbox with this formt 04-JAN-2009? Thanks in advance Bijan Try this formula in the linked cell: =TEXT(TODAY()-20,"DD-MMM-YYYY") Hope this helps / Lars-Åke |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
current date
I would just use
=TODAY()-20 and format the cell as required so as to leave a true date in the cell. -- __________________________________ HTH Bob "Lars-Åke Aspelin" wrote in message ... On Sun, 4 Jan 2009 08:17:01 -0800, bijan wrote: Hi All I use Excel 2003 SP2 and have two question: 1. I try to set function "=year(date())" in control source property of a textbox but I recive an error to use invalid property why? 2. I need get current date and minus 20 days and show it in a textbox with this formt 04-JAN-2009? Thanks in advance Bijan Try this formula in the linked cell: =TEXT(TODAY()-20,"DD-MMM-YYYY") Hope this helps / Lars-Åke |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
current date
Oops, missed the textbox point.
-- __________________________________ HTH Bob "Bob Phillips" wrote in message ... I would just use =TODAY()-20 and format the cell as required so as to leave a true date in the cell. -- __________________________________ HTH Bob "Lars-Åke Aspelin" wrote in message ... On Sun, 4 Jan 2009 08:17:01 -0800, bijan wrote: Hi All I use Excel 2003 SP2 and have two question: 1. I try to set function "=year(date())" in control source property of a textbox but I recive an error to use invalid property why? 2. I need get current date and minus 20 days and show it in a textbox with this formt 04-JAN-2009? Thanks in advance Bijan Try this formula in the linked cell: =TEXT(TODAY()-20,"DD-MMM-YYYY") Hope this helps / Lars-Åke |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
current date
Hi,
You haven't told us where your text box is - is it in the spreadsheet or on a VBA form. Suppose it's on a user form (VBA) then Private Sub UserForm_Initialize() Me.TextBox1 = Format(Date-20, "dd-mmm-yyyy") End Sub -- If this helps, please click the Yes button Cheers, Shane Devenshire "bijan" wrote: Hi All I use Excel 2003 SP2 and have two question: 1. I try to set function "=year(date())" in control source property of a textbox but I recive an error to use invalid property why? 2. I need get current date and minus 20 days and show it in a textbox with this formt 04-JAN-2009? Thanks in advance Bijan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
formula to look at current date and markdown date to give price | Excel Discussion (Misc queries) | |||
Figuring Vacation Hrs. Earned using Current Date minus Hire Date | Excel Worksheet Functions | |||
Make date change in excel to current date when opening daily? | Excel Discussion (Misc queries) | |||
Can I automatically enter the current date or current time into a | New Users to Excel | |||
Calculating days between current date and a date in future NETWORKDAYS() function | Excel Worksheet Functions |