W
ward
Hi,
Is there a way to "group" VBA actions, so that when the
user performs undo (e.g. by pressing CTRL-Z), all the VBA
actions I have grouped are undone at once?
I would like something like the following:
----
Suppose there is some VBA command to start an undo group
(e.g. application.undo.start), then write some VBA
commands, and then close the undo group (e.g.
application.undo.end)
With my imaginary method, code could look like this:
application.undo.start
.range.delete
.range.insertafter "test"
application.undo.end
If the user now performs undo, both the delete action and
the insertion of text action would be undone at once. In
the real world, the user now has to press undo twice.
------
Of course, it doesn't work with my imaginary method, but
maybe somebody knows a way to do what i want...?
thanks
WArd
Is there a way to "group" VBA actions, so that when the
user performs undo (e.g. by pressing CTRL-Z), all the VBA
actions I have grouped are undone at once?
I would like something like the following:
----
Suppose there is some VBA command to start an undo group
(e.g. application.undo.start), then write some VBA
commands, and then close the undo group (e.g.
application.undo.end)
With my imaginary method, code could look like this:
application.undo.start
.range.delete
.range.insertafter "test"
application.undo.end
If the user now performs undo, both the delete action and
the insertion of text action would be undone at once. In
the real world, the user now has to press undo twice.
------
Of course, it doesn't work with my imaginary method, but
maybe somebody knows a way to do what i want...?
thanks
WArd