Posts by ABHale

    Excel Workbook with digitally signed macro (important?)


    The primary execution of the macro in the Excel workbook following the embedding of
    the Excel workbook works, after saving, closing, and re-opening the document the secondary execution of the macro fails.


    The macro copies values from a data entry sheet, to a chart data sheet,
    and revises the chart with the new data.

    Process Detail:


    Workbook in Excel
    Macro works as expected


    Embed workbook in Word


    Enter Excel, change data, run macro, exit Excel
    Enter Excel, change data, run macro, exit Excel
    Enter Excel, change data, run macro, exit Excel
    ....


    Save Word document
    Exit Word
    Start Word
    Open document


    Enter Excel, change data, run macro, get message:


    Microsoft Office Excel cannot access the file 'Worksheet in C: [filename of document]'
    There are several possible reasons:


    The filename or path does not exist.
    The file is being used by another program.
    The workbook you are trying to save has the same name as a currently open workbook.


    Excel and Word are 2007


    Has anyone run into this?
    Have you been able to solve it?

    Re: Keep Log Of Cell Changes


    This is an extension of my previous posting.

    I have incorporated code to capture the original value(s) when Workbook_SheetSelectionChange (W_SSC) is invoked.


    And log both the original value(s) and the current values(s) when
    Workbook_SheetChange (W_SC) is invoked.


    Now the problem:
    The operator clicks in a cell, W_SSC is invoked and the original value is captured.
    The operator changes the value, then without doing anything to invoke the W_SC, drags the value down several rows, which changes the values, and stops.
    W_SSC is invoked and captures the changed values.
    W_SC is invoked and compares what is supposed to be the original values to the current values and of course they match.


    Is there a way around this?
    Besides telling the operator don't do that?

    Re: Keep Log Of Cell Changes


    It seems obvious now, but since I don't work with Tracking Changes very often, I hadn't thought of that as a way of accomplishing what I need. Thanks!

    Re: Create A Modified Data Log With Before And After Values


    Thank you.


    Seeing the example it's easier than I was thinking it was going to be.


    I was going for a much more complex solution. Thanks.

    Re: Create A Modified Data Log With Before And After Values


    Thanks Mac.


    The idea of the modification log is to see who changed what and when, over time. The shared workbook is a good idea but doesn't apply in this case.

    Operation: The operator can obviously change any cell on the sheet, what I want to do is capture the value of the cell before the data is modified and the new just entered value.

    Question:
    Is there any simple way of doing this?

    Accessing the Excel Undo stack perhaps?

    Or does it take writing code coordinating the Worksheet_SelectionChange and Worksheet_Change events to capture the before data when the SelectionChanges in anticipation that it's going to be modified and identified in the Worksheet_Change event.