ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Date Stamp Need (https://www.excelbanter.com/excel-worksheet-functions/97228-date-stamp-need.html)

Harvey Gersin

Date Stamp Need
 
Several people need access to particular Excel Spreadsheets on a company server. Every time they open a sheet, we need to know the date and time that sheet was last accessed.

Is there a way to have the date and time register automatically when a sheet is opened or when information is placed in any cell within the sheet?

Help is appreciated.

--
___________________
Harvey Gersin


Nick Hodge

Date Stamp Need
 
Harvey

You could use some workbook_Sheetchange event code like so (This code goes in the ThisWorkbook module)

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Range("A1").Value = Now()
Application.EnableEvents = True
End Sub

This will place the date and time on each worksheet in a workbook in which it is placed in A1 of the sheet changed

You could also switch on the track changes feature which writes to a hidden sheet and has much more detail than this

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"Harvey Gersin" wrote in message ...
Several people need access to particular Excel Spreadsheets on a company server. Every time they open a sheet, we need to know the date and time that sheet was last accessed.

Is there a way to have the date and time register automatically when a sheet is opened or when information is placed in any cell within the sheet?

Help is appreciated.

--
___________________
Harvey Gersin


Harvey Gersin

Date Stamp Need
 
Sounds like this would work.

Unfortunately, I am not skilled in VBE which, I believe, is required.

Could you please provide a step-by-step instruction on what I need to do to get this code into my worksheet?

Thank you very much.

--
___________________
Harvey Gersin

"Nick Hodge" wrote in message ...
Harvey

You could use some workbook_Sheetchange event code like so (This code goes in the ThisWorkbook module)

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Range("A1").Value = Now()
Application.EnableEvents = True
End Sub

This will place the date and time on each worksheet in a workbook in which it is placed in A1 of the sheet changed

You could also switch on the track changes feature which writes to a hidden sheet and has much more detail than this

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"Harvey Gersin" wrote in message ...
Several people need access to particular Excel Spreadsheets on a company server. Every time they open a sheet, we need to know the date and time that sheet was last accessed.

Is there a way to have the date and time register automatically when a sheet is opened or when information is placed in any cell within the sheet?

Help is appreciated.

--
___________________
Harvey Gersin


Nick Hodge

Date Stamp Need
 
Harvey

In your workbook, Press alt+F11. This will launch the VBE (Visual Basic Editor)on the left you should see an entry for 'ThisWorkbook', right click here and select view code.

Paste the code here

Close the VBE, save the workbook.

Bear in mind the code as written will overwrite anything in A1, change the code if you want somewhere different

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"Harvey Gersin" wrote in message . ..
Sounds like this would work.

Unfortunately, I am not skilled in VBE which, I believe, is required.

Could you please provide a step-by-step instruction on what I need to do to get this code into my worksheet?

Thank you very much.

--
___________________
Harvey Gersin

"Nick Hodge" wrote in message ...
Harvey

You could use some workbook_Sheetchange event code like so (This code goes in the ThisWorkbook module)

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
Range("A1").Value = Now()
Application.EnableEvents = True
End Sub

This will place the date and time on each worksheet in a workbook in which it is placed in A1 of the sheet changed

You could also switch on the track changes feature which writes to a hidden sheet and has much more detail than this

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"Harvey Gersin" wrote in message ...
Several people need access to particular Excel Spreadsheets on a company server. Every time they open a sheet, we need to know the date and time that sheet was last accessed.

Is there a way to have the date and time register automatically when a sheet is opened or when information is placed in any cell within the sheet?

Help is appreciated.

--
___________________
Harvey Gersin



All times are GMT +1. The time now is 07:14 AM.

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