Vijaya Bhaskara Prasanna
New Member
- Joined
- May 5, 2011
- Messages
- 1
Hi! Seasons Greetings!
In MS-excel 2003, I have written macros for different actions on a work sheet. For every action I am storing the previous and current values of the affected range in an array for a later undo and/or redo of the macro actions. At the end of every macro that are invoked by an event on the sheet I am invoking the Application.Onundo method like
Application.Onundo "undo .... action", "undo_procedure<UNDO name procedure>"
to enable the Edit-> undo command and it works fine.
And at the end of <UNDO procedure>I am calling same method like
Application.Onundo "undo .... action", "undo_procedure<UNDO name procedure>"
to enable the Edit-> undo command for the second time so that I can undo the previous actions of macros but it doesn't work. The Edit -undo command is not enabled again. Could anyone help me here please?
Also I would like to know how to enable the Edit-> redo command.
P.S.: The procedure, undo_procedure, <UNDO procedure>reads the array to restore the old values in the affected range and writes them to the respective places.
Thanks,
Vijaya.
In MS-excel 2003, I have written macros for different actions on a work sheet. For every action I am storing the previous and current values of the affected range in an array for a later undo and/or redo of the macro actions. At the end of every macro that are invoked by an event on the sheet I am invoking the Application.Onundo method like
Application.Onundo "undo .... action", "undo_procedure<UNDO name procedure>"
to enable the Edit-> undo command and it works fine.
And at the end of <UNDO procedure>I am calling same method like
Application.Onundo "undo .... action", "undo_procedure<UNDO name procedure>"
to enable the Edit-> undo command for the second time so that I can undo the previous actions of macros but it doesn't work. The Edit -undo command is not enabled again. Could anyone help me here please?
Also I would like to know how to enable the Edit-> redo command.
P.S.: The procedure, undo_procedure, <UNDO procedure>reads the array to restore the old values in the affected range and writes them to the respective places.
Thanks,
Vijaya.
Last edited: