Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Identifying the user that has a workbook open? DS Excel Programming 2 April 17th 07 08:54 AM
Open workbook in user-defined folder pdberger Excel Programming 4 August 30th 05 09:39 PM
How to create a URL and when user clicks it to open a Excel workbook Belinda Excel Programming 2 May 30th 04 01:06 PM
Check For Open Workbook by another User Mark Excel Programming 1 November 6th 03 03:45 AM
Excel not warning if another user has the workbook open Edward Chalk Excel Programming 2 July 21st 03 06:18 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"