Capture PC date and time

ioohay1

New Member
Joined
Dec 26, 2005
Messages
6
Is there a way to capture the PC system date and time separately in two different cells? Date format is dd/mm/yy, time format is hh:mm AM/PM.
 

Some videos you may like

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

ioohay1

New Member
Joined
Dec 26, 2005
Messages
6
Thanks for the info sharing.

Is there any way to capture such date and time and lock it after saving? The next time the file is opened, the date and time will not refresh to the current date and time but displayed as the saved version. This is to allow capturing the true date and time upon saving.
 

stuartford

Active Member
Joined
Nov 28, 2002
Messages
419
i use this to log user name ond time of last change, the data is saved to a hidden sheet


hope this is of some help



Private Sub Workbook_Open()

Dim user As Variant
Dim mytime As Date
user = Environ("Username")
mytime = Now


Sheets("Admin").Visible = True
newrow = Sheets("Admin").Cells(1, 1)

Sheets("Admin").Cells(newrow, 1) = user
Sheets("Admin").Cells(newrow, 2) = mytime
Sheets("Plan").Select
Range("A10").Select
Sheets("Admin").Visible = False

End If

End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,118,228
Messages
5,571,008
Members
412,353
Latest member
SofiaV
Top