ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to record a sheet change showing row column sheet name and date? (https://www.excelbanter.com/excel-programming/312494-how-record-sheet-change-showing-row-column-sheet-name-date.html)

Simon Lloyd[_578_]

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



All times are GMT +1. The time now is 01:16 PM.

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