#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default auto date

Is there a way to automatically fill in the today's date (that will not update) when an entry is entered? I'm pretty sure there is but can't get the syntax. I'm just starting with this stuff. Also, how can I get the SQLStatement in a Mailmerge to pick today's date? Any help would be GREATLY appreciated

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default auto date

Hi Rik13

You can use a Shortcut for it

You can insert the time like this
CTRL : (colon)

The date like this
CTRL ; (semicolon)

CTRL : (colon) space bar CTRL ; (semicolon)
this will give you both in one cell

Or with VBA

You can do it with the change event of the worksheet
This example will place the date/time in the B column if you change
a cell in the range A1:A20.

Place the code in the Sheet module

Right click on a sheet tab and choose view code
Paste the code there
Alt-Q to go back to Excel

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("a1:a20"), Target) Is Nothing Then
Target.Offset(0, 1).Value = Format(Now, "mm-dd-yy hh:mm:ss")
End If
End Sub

For one column
If Target.Column = 1 Then

For one Row
If Target.Row = 1 Then



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Rik13" wrote in message ...
Is there a way to automatically fill in the today's date (that will not update) when an entry is entered? I'm pretty sure

there is but can't get the syntax. I'm just starting with this stuff. Also, how can I get the SQLStatement in a Mailmerge to
pick today's date? Any help would be GREATLY appreciated!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default auto date

Sorry... What I need to do is just attach what I think is a couple of lines to an existing button so that I can insert the current date in a column where there is an entry. I just can't make it do so in more than one cell...
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default auto date

Rik13, how about this

Selection = Date

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **

"Rik13" wrote in message
...
Sorry... What I need to do is just attach what I think is a couple of

lines to an existing button so that I can insert the current date in a
column where there is an entry. I just can't make it do so in more than one
cell...


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default auto date

Works GREAT!!! One day I'll understand what it means... Thanks for the help.
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
auto date Andy JL New Users to Excel 5 September 15th 08 11:59 PM
Auto calculate for date + days forward to yield new date John Sullivan Excel Worksheet Functions 1 April 22nd 06 05:18 PM
Auto Protecting cells & auto filling date ccarmock Excel Discussion (Misc queries) 7 September 30th 05 09:21 PM
Auto Date Lyali Excel Worksheet Functions 3 April 30th 05 09:13 PM
assign auto number and auto date Krit Kasem Excel Discussion (Misc queries) 2 January 14th 05 02:55 AM


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