Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ç(User Entry)è can any one explain this | Excel Discussion (Misc queries) | |||
Excel 2002 date entry: Cannot get away from d-m-yy entry format | Excel Discussion (Misc queries) | |||
Validation list that also allows user entry? | Excel Worksheet Functions | |||
Auto email - With every new entry on my user form | Excel Discussion (Misc queries) | |||
how to format a date/validate for a text box entry on a user form | Excel Programming |