#1   Report Post  
coconutt
 
Posts: n/a
Default date fields

I am curious if their is a way to insert a date automatically in a field each
time the field is entered. ei. my A collum is a date collum and each line
needs a date.

Thanks
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Column = 1 Then
Target.Value = Format(Date, "dd mmm yyyy")
End If

End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--
HTH

Bob Phillips

"coconutt" wrote in message
...
I am curious if their is a way to insert a date automatically in a field

each
time the field is entered. ei. my A collum is a date collum and each line
needs a date.

Thanks



  #3   Report Post  
DNA
 
Posts: n/a
Default

I've had a lot of succes with this:

http://www.fontstuff.com/vba/vbatut07.htm

HTH

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 do I create a schedule from a list of dates ? Gavin Morris Charts and Charting in Excel 2 October 28th 10 04:08 PM
Changing Cell formats to date fields automatically PCLIVE Excel Worksheet Functions 3 April 12th 05 10:34 PM
Autofilter on date fields should refelct the underlying data (rat. mrpb Excel Discussion (Misc queries) 5 January 18th 05 03:11 PM
Formatting date fields after export Raymond Excel Discussion (Misc queries) 2 December 1st 04 12:04 AM
Comparing Date Fields Cathy Excel Worksheet Functions 1 November 6th 04 01:29 AM


All times are GMT +1. The time now is 04:44 AM.

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

About Us

"It's about Microsoft Excel"