Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a workbook and 6 of us have access to the workbook. I want to write a code so that i can come to know how many people opened the file and made the changes. I need the following information on a separate sheet. 1. Lan Id (Name of the person who log's in.) 2. Date 3. Time 4. Changes made and saved (Yes/No) I know very basic level of scripting it is too difficult for me. Regards Heera |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Forgot to paste the code.
Option Explicit Private Sub Workbook_Open() '1. Lan Id (Name of the person who log's in.) '2. Date '3. Time '4. Changes made and saved (Yes/No) 'Create a worksheet for the log. 'Set the worksheet codename to "LOG" Dim lRow As Long If Logsheet Is Nothing Then MsgBox ("You have no worksheet with the codename logsheet in your workbook") Exit Sub End If lRow = Logsheet.Cells(Logsheet.Rows.Count, 1).End(xlUp).Row + 1 If lRow = 2 Then With Logsheet .Cells(1, 1).Value = "User Name" .Cells(1, 2).Value = "Date" .Cells(1, 3).Value = "Time" .Cells(1, 4).Value = "Changes Made" End With End If Logsheet.Cells(lRow, 1).Value = Environ("USERNAME") With Logsheet.Cells(lRow, 2) .Value = Date .NumberFormat = "mm/dd/yyyy" End With With Logsheet.Cells(lRow, 3) .Value = Time .NumberFormat = "h:mm AM/PM" End With Logsheet.Cells(lRow, 4).Value = "Changes Made" End Sub -- HTH, Barb Reinhardt If this post was helpful to you, please click YES below. "Heera" wrote: Hi, I have a workbook and 6 of us have access to the workbook. I want to write a code so that i can come to know how many people opened the file and made the changes. I need the following information on a separate sheet. 1. Lan Id (Name of the person who log's in.) 2. Date 3. Time 4. Changes made and saved (Yes/No) I know very basic level of scripting it is too difficult for me. Regards Heera |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here's the first part. Put this in the ThisWorkbook Module. You'll need to
create a new worksheet and make the worksheet codename LOGSHEET. From the worksheet tab, right click to VIEW CODE. Select the worksheet of interest Change the name here to LOGSHEET. Maybe someone else can help with the second part. -- HTH, Barb Reinhardt If this post was helpful to you, please click YES below. "Heera" wrote: Hi, I have a workbook and 6 of us have access to the workbook. I want to write a code so that i can come to know how many people opened the file and made the changes. I need the following information on a separate sheet. 1. Lan Id (Name of the person who log's in.) 2. Date 3. Time 4. Changes made and saved (Yes/No) I know very basic level of scripting it is too difficult for me. Regards Heera |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can't find file opened from email,changes made & saved | Excel Discussion (Misc queries) | |||
Track whose made changes | Excel Programming | |||
how to track changes made to a excel sheet using VisualBasic | Excel Discussion (Misc queries) | |||
How to keep track of opened sheet? | Excel Programming | |||
Can I track changes made to a shared file per userid. | Excel Discussion (Misc queries) |