ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   need help. (https://www.excelbanter.com/excel-programming/409166-need-help.html)

Smart Akhtar

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.

Gary''s Student

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.


Smart Akhtar

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


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

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