View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_578_] Simon Lloyd[_578_] is offline
external usenet poster
 
Posts: 1
Default How to record a sheet change showing row column sheet name and date?


Thanks Bob,

I inserted the code into the worksheet selection change at the botto
of all my code and then made selection changes to the worksheet after
change was made it came up with a debug error (424 i think!) giving
problem with object required, however the file does exist! I couldn
get the second line to work without adding the brackets aroun
Filename. When the 424 fault arises the oWB=Nothing an
Nothing=Nothing, i'm sure its my fault and im missing something.

If oWBAudit Is Nothing Then
Set oWBAudit = Workbooks.Open(FileName:="C:\Audit\Tracking.xls")
End If

'writing the change is simply a matter of addig something like

With oWBAudit.Worksheets(1).Cells(Rows.Count, "A").End(xlUp)
.Offset(1, 0).Value = Target.Value
.Offset(1, 1).Value = Format(Date, "dd mmm yyyy")
.Offset(1, 2).Value = Application.UserName
End With

End Su

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=26636