ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how can i know the last user who open the workbook (https://www.excelbanter.com/excel-programming/389308-how-can-i-know-last-user-who-open-workbook.html)

Sebation.G[_2_]

how can i know the last user who open the workbook
 
Hi,cas i share my wrokbook with a group , i want wirte a macro code to know
the last user &time who open the workbook ?

any help will be appreciated

--
Regards,

Sebation.G



Gary''s Student

how can i know the last user who open the workbook
 
Put:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Set r = Sheets("Sheet1").Range("Z100")
r.Value = Environ("UserName")
r.Offset(0, 1).Value = Now
End Sub


in the ThisWorkbook code area. The previous user's name and date/time will
be recorded in Z100 and Z101.
--
Gary''s Student - gsnu200721


"Sebation.G" wrote:

Hi,cas i share my wrokbook with a group , i want wirte a macro code to know
the last user &time who open the workbook ?

any help will be appreciated

--
Regards,

Sebation.G




Sebation.G[_2_]

how can i know the last user who open the workbook
 
thanks,
it does work well

--
Regards,

Sebation.G
"Gary''s Student" ...
Put:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Set r = Sheets("Sheet1").Range("Z100")
r.Value = Environ("UserName")
r.Offset(0, 1).Value = Now
End Sub


in the ThisWorkbook code area. The previous user's name and date/time
will
be recorded in Z100 and Z101.
--
Gary''s Student - gsnu200721


"Sebation.G" wrote:

Hi,cas i share my wrokbook with a group , i want wirte a macro code to
know
the last user &time who open the workbook ?

any help will be appreciated

--
Regards,

Sebation.G







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

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