Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Date Tagging User Entry

How can I date-tag a user entry? If the user, for example, enters data into
A1, the Macro should detect it and enter the value of the date in the
adjacent cell, B1.
--
Gary's Student
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Date Tagging User Entry

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrorHandler
Application.EnableEvents = False
Target.Offset(0, 1).Value = Now()
ErrorHandler:
Application.EnableEvents = True
End Sub

HTH

Jim Thomlinson


"Gary's Student" wrote:

How can I date-tag a user entry? If the user, for example, enters data into
A1, the Macro should detect it and enter the value of the date in the
adjacent cell, B1.
--
Gary's Student

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Date Tagging User Entry

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in any cell in Col A
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 Then
n = Target.Row
If Excel.Range("A" & n).Value < "" Then
Excel.Range("B" & n).Value = Date 'Now if you want Time also
End If
End If
enditall:
Application.EnableEvents = True
End Sub

This is sheet event code.

Right-click on the sheet tab and "view code".

Paste the above in that module.


Gord Dibben Excel MVP

On Tue, 17 May 2005 16:51:02 -0700, "Gary's Student"
wrote:

How can I date-tag a user entry? If the user, for example, enters data into
A1, the Macro should detect it and enter the value of the date in the
adjacent cell, B1.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Date Tagging User Entry

Thank you both.
--
Gary's Student


"Gary's Student" wrote:

How can I date-tag a user entry? If the user, for example, enters data into
A1, the Macro should detect it and enter the value of the date in the
adjacent cell, B1.
--
Gary's Student

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
ç(User Entry)è can any one explain this pete the greek Excel Discussion (Misc queries) 1 October 17th 09 09:51 PM
Excel 2002 date entry: Cannot get away from d-m-yy entry format Steve Eklund Excel Discussion (Misc queries) 3 May 11th 09 04:57 PM
Validation list that also allows user entry? Angela Dennis 911 Excel Worksheet Functions 6 July 20th 06 02:33 PM
Auto email - With every new entry on my user form Vikram Excel Discussion (Misc queries) 0 June 19th 06 06:00 AM
how to format a date/validate for a text box entry on a user form Tom Ogilvy Excel Programming 3 June 1st 05 05:06 PM


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