Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default track cell changes

Is there a quick way to track/log changes made in a cell - there is an add-in
that calculates values (you can see the values in this cell) to produce other
values. I want to be able to list the values (as seen in this cell) - they
aren't logged or shown anywhere else by this add-in and are over written too
quickly to be noted down manually.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default track cell changes

*** Warning Following example fails, but may give a good idea on how to do
it ***
Look at the following code that I wrote, attached to a worksheet:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
MsgBox "change"
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
MsgBox "selection_change"
End Sub
The above shows events you can attach to the worksheet. Then each time you
move the
cursor in the worksheet in question, 'SelectionChange' fires. You could use
that event to
copy the value of the selection into a global.

Public Oldval As Variant
Public oldaddr As Variant

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not ActiveSheet.Name = "log" Then
Sheets("log").Select
Range("'log'!A1").End(xlDown).Offset(1, 0).Value = oldaddr
Range("'log'!A1").End(xlDown).Offset(1, 1).Value = Oldval
Range("'log'!A1").End(xlDown).Offset(1, 2).Value =
Range(oldaddr).Value
Sheets(1).Select
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Oldval = ActiveCell.Value
oldaddr = ActiveCell.Address
End Sub

The above code failes. Perhaps excel is too confused by trying to change
the
sheet before the event is done fireing. I don't know. But if you instead
of writing
changes to the 'log' sheet, if you used a flat file (opened with the open
statement)
you may have more success. You could then review the data in notepad or
bring
it into a spreadsheet.

"Caroline B" <Caroline wrote in message
...
Is there a quick way to track/log changes made in a cell - there is an

add-in
that calculates values (you can see the values in this cell) to produce

other
values. I want to be able to list the values (as seen in this cell) -

they
aren't logged or shown anywhere else by this add-in and are over written

too
quickly to be noted down manually.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
track use of cell willemeulen Excel Discussion (Misc queries) 1 April 28th 09 08:50 AM
How can I track changes to a cell in Excel? Ukyankee Excel Discussion (Misc queries) 17 June 26th 08 09:50 PM
Track Cell Changes Shreekant Patel Excel Worksheet Functions 1 August 13th 07 12:26 PM
track changes in a cell Wayne Excel Discussion (Misc queries) 0 April 23rd 07 07:30 PM
Excel 97 SR-1 / Set date in a cell-have day track in another cell mgb757 Excel Discussion (Misc queries) 1 September 20th 05 02:15 AM


All times are GMT +1. The time now is 09:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"