Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Re-write "track changes" of Excel in VBA

I'm trying to rewrite a sort of the "track changes" feature of Excel using
VBA.
The method I'm following is to store in a variable the value of the active
cell/range every time the application event "selection change" is triggered.
Then I compare changes versus the previous stored variable when the
application event "sheet change" happens, and so write eventual changes in
formulas/values to a separate worksheet.

The procedure above seems to work fine when changing the values into cells
using "normal" methods like just writing the new value into a cell or
copying and pasting even complex ranges (not just single cells).

However, I noticed it doesn't work when using the autofill method: dragging
(or double clicking) the small dot at bottom right corner of the selection
marker.
This is due because in this case the "change" event is triggered BEFORE the
"selection change" event is triggered, and not after as in "normal" methods.
So in this case the application cannot store the values/formulas the cells
had before they were changed, thus the application think no change happened.

I wonder whether there's a complete different way for doing that, like
having a method of the range object that is passed to the "Change" event
that stores the value/formula the range had before the change.

That's the SheetChange event declaration I'm using. Maybe I'm missing
somthing?
Private Sub App_SheetChange(ByVal Sh As Object, ByVal Target As Range)

Do you have any idea for solving the above issue?
Many thanks for your help.

Paolo
Milan, Italy


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
How do I write an excel formula with a text answer ("yes" or "no") pat Excel Discussion (Misc queries) 1 September 9th 08 03:41 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
is it possitle i write"1"and "one" will show in next coloumn. srksiddiqui Excel Discussion (Misc queries) 1 June 9th 08 02:37 PM
"Track Changes" - Prevent turn off track changes to meet SOX regs Tammy Miller Excel Discussion (Misc queries) 2 July 31st 07 11:42 AM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM


All times are GMT +1. The time now is 11:59 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"