#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 44
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default 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
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
formula to look at current date and markdown date to give price veena Excel Discussion (Misc queries) 4 November 13th 08 07:40 PM
Figuring Vacation Hrs. Earned using Current Date minus Hire Date Sharon Excel Worksheet Functions 6 May 3rd 07 10:32 PM
Make date change in excel to current date when opening daily? jamie Excel Discussion (Misc queries) 3 March 1st 06 03:37 PM
Can I automatically enter the current date or current time into a Ben New Users to Excel 7 October 19th 05 03:38 PM
Calculating days between current date and a date in future NETWORKDAYS() function Faheem Khan Excel Worksheet Functions 2 February 10th 05 07:18 PM


All times are GMT +1. The time now is 10:35 AM.

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"