View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default Create a log sheet

http://boisgontierjacques.free.fr/fi...eModifiees.xls

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
If Sh.Name < "Espion" Then
Application.EnableEvents = False
temp = Application.CountA(Sheets("espion").Range("a:a")) + 1
Sheets("espion").Cells(temp, 1) = Sh.Name
Sheets("espion").Cells(temp, 2) = Target.Address
Sheets("espion").Cells(temp, 3) = Now
Sheets("espion").Cells(temp, 4) = [mémo]
Sheets("espion").Cells(temp, 5) = Target
Sheets("espion").Cells(temp, 6) = Environ("username")
Application.EnableEvents = True
End If
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Range)
If Target.Count = 1 Then
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34)
& Target.Value & Chr(34)
End If
End Sub

JB
http://boisgontierjacques.free.fr

On 13 avr, 19:35, terilad wrote:
Hi,

I am looking to create a worksheet within my workbook to log open, save and
data entry events, with time and date and user and computer, is there a macro
that can do this?

Many thanks

Mark