+ Reply to Thread
Results 1 to 5 of 5

How to tell What action is causing an on event Workbook change

  1. #1
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Harrisburg, PA
    MS-Off Ver
    Office 365 MSO (16.0.10730.20264) 32-bit
    Posts
    172

    How to tell What action is causing an on event Workbook change

    Hi All.

    I am trying to write a "change tracking" routine and log changes to a hidden tab. I have it working for individual cells changes and range changes by copy or paste.

    I need to know what action excel is doing that causes the event workbook_sheetchange... A copy / Paste or an insert / delete.. etc. Then I can use that to decide what to log.

    Thanks.
    Steve

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: How to tell What action is causing an on event Workbook change

    Assuming I understand your post correctly and you have the code already you can click in the code window and press F8 and it will step through each line of code every time you press F8.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,378

    Re: How to tell What action is causing an on event Workbook change

    Hi Steve,

    I think you are asking about a Worksheet_Activate event? I use these when I have a pivot table on a sheet and want it to refresh whenever someone clicks on that tab. See:

    http://www.ozgrid.com/VBA/run-macros-change.htm

    If that isn't it then supply a short example or give more information.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Harrisburg, PA
    MS-Off Ver
    Office 365 MSO (16.0.10730.20264) 32-bit
    Posts
    172

    Re: How to tell What action is causing an on event Workbook change

    Sorry for the poor description. Let me try again.

    I want to track all changes to any sheet in a workbook. The file is a Profit and Loss Statement with many sheets. I want to know if anyone changes any value or formula on any of the sheets. So, anytime anyone changes anything in the file, I want to log the changes to a hidden tab named "Log".

    I have attached a picture of what the output is from the VBA Workbook_SheetChange event

    LogSheet.JPG

    Here is my code in process...

    Please Login or Register  to view this content.
    I want to know is there anyway to determine in the Workbook_SheetChange sub, what caused the Change... Was it an Insert Row, a Delete Row?

  5. #5
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Harrisburg, PA
    MS-Off Ver
    Office 365 MSO (16.0.10730.20264) 32-bit
    Posts
    172

    Re: How to tell What action is causing an on event Workbook change

    OK.. I have been able to do my tracking of modification:
    Edit a cell - I can track the modification
    clear a cell - I can track the modifications

    Now... If someone copies and pastes a row (or column), I know what the values are, but I don't want to loop thru 16,000 cells to see what the previous values were and then what the new values are changing to. How do I handle this?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Workbook BeforeSave Event causing workbook to close
    By Jo2710 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-18-2014, 12:33 AM
  2. [SOLVED] workbook change event
    By Goodstart14 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-14-2014, 02:52 PM
  3. Force Change Event in workbook
    By scribbler in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-28-2011, 06:37 PM
  4. Essbase Causing Selection Change Event to Fire
    By Jim Thomlinson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2005, 05:45 PM
  5. [SOLVED] Change Workbook Event
    By Ronbo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2005, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1