ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date time stamp (https://www.excelbanter.com/excel-programming/293061-re-date-time-stamp.html)

Frank Kabel

Date time stamp
 
Hi
you may put the following code in your workbook module

Private Sub Workbook_Open()
Worksheets("Sheet1").Select
Range("A1").Value = now
End Sub


--
Regards
Frank Kabel
Frankfurt, Germany

Erik wrote:
I am trying to place a date/time stamp in one cell that is updated
when the sheet is opened. What is the best way to do this? Erik


No Name

Date time stamp
 
Can a derivative of this work for stamping a cell when an
adjacent cell is updated?


-----Original Message-----
Hi
you may put the following code in your workbook module

Private Sub Workbook_Open()
Worksheets("Sheet1").Select
Range("A1").Value = now
End Sub


--
Regards
Frank Kabel
Frankfurt, Germany

Erik wrote:
I am trying to place a date/time stamp in one cell that

is updated
when the sheet is opened. What is the best way to do

this? Erik
.


Frank Kabel

Date time stamp
 
Hi
try the following: Put the following code in your worksheet module. It
will put the current date in column B if a value is inserted in column
A

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("A:A")) Is Nothing Then Exit Sub
On Error GoTo CleanUp:
With Target
If .Value = <"" Then
Application.EnableEvents = False
.offset(0,1).value = Format(now,"MM-DD-YYYY")
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub


--
Regards
Frank Kabel
Frankfurt, Germany

wrote:
Can a derivative of this work for stamping a cell when an
adjacent cell is updated?


-----Original Message-----
Hi
you may put the following code in your workbook module

Private Sub Workbook_Open()
Worksheets("Sheet1").Select
Range("A1").Value = now
End Sub


--
Regards
Frank Kabel
Frankfurt, Germany

Erik wrote:
I am trying to place a date/time stamp in one cell that is updated
when the sheet is opened. What is the best way to do

this? Erik
.



Gord Dibben

Date time stamp
 
anon

You could use Event code in a worksheet.

See J.E. McGimpsey's TimeStamp page.

http://www.mcgimpsey.com/excel/timestamp.html


Gord Dibben Excel MVP




On Mon, 1 Mar 2004 12:22:11 -0800,
wrote:

Can a derivative of this work for stamping a cell when an
adjacent cell is updated?


-----Original Message-----
Hi
you may put the following code in your workbook module

Private Sub Workbook_Open()
Worksheets("Sheet1").Select
Range("A1").Value = now
End Sub


--
Regards
Frank Kabel
Frankfurt, Germany

Erik wrote:
I am trying to place a date/time stamp in one cell that

is updated
when the sheet is opened. What is the best way to do

this? Erik
.




All times are GMT +1. The time now is 04:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com