#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default need help.

Hi,
I have one workbook. which is use by many user on single location.
I want to create the log report for that file. means who worked last
time on that file and I also want a report should be create in excel
sheet.
Please help me with code .

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default need help.

First put this macro in the workbook code area:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Activate
n = Cells(Rows.Count, 1).End(xlUp).Row + 1
Cells(n, 1).Value = Environ("username")
Cells(n, 2).Value = Date
End Sub

The log will be in Sheet1, (change to suit). Whenever a user saves the
workbook, the username will be recorded in column A and the date in column B.
--
Gary''s Student - gsnu2007g


"Smart Akhtar" wrote:

Hi,
I have one workbook. which is use by many user on single location.
I want to create the log report for that file. means who worked last
time on that file and I also want a report should be create in excel
sheet.
Please help me with code .

Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default need help.

On Apr 11, 4:51*am, Gary''s Student
wrote:
First put this macro in the workbook code area:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Activate
n = Cells(Rows.Count, 1).End(xlUp).Row + 1
Cells(n, 1).Value = Environ("username")
Cells(n, 2).Value = Date
End Sub

The log will be in Sheet1, (change to suit). *Whenever a user saves the
workbook, the username will be recorded in column A and the date in column B.
--
Gary''s Student - gsnu2007g



"Smart Akhtar" wrote:
Hi,
I have one workbook. which is use by many user on single location.
I want to create the log report for that file. means who worked last
time on that file and I also want a report should be create in excel
sheet.
Please help me with code .


Thanks in advance.- Hide quoted text -


- Show quoted text -


Thanks a lot
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



All times are GMT +1. The time now is 09:56 AM.

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"