View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default 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