Author Topic: (Urgent) How to Enable "Ctrl+Z" (undo) funtion in Macros..?  (Read 5535 times)

0 Members and 1 Guest are viewing this topic.

Venkatesh

  • Newbie
  • *
  • Posts: 7
(Urgent) How to Enable "Ctrl+Z" (undo) funtion in Macros..?
« on: December 03, 2013, 06:36:39 AM »
Dear all,

I am running a Macro's in a Visio file..But when ever i try to do the 'Undo' operation  :-[
after running this Macro, it doesnt happen..In other words, "Ctrl+Z" doesnt work after running the Macros.

Can anyone please help me, how best i can undo an Macro..?

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3286
    • Paul Herber's website
Re: (Urgent) How to Enable "Ctrl+Z" (undo) funtion in Macros..?
« Reply #1 on: December 03, 2013, 06:47:30 AM »
Undo is normally enabled during macros unless you tell it otherwise. However, there are some operations that are not undo-able at all. Is there any particular operation which doesn't work?
I've just created a macro, run it, then used undo to undo it, no problem.
Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

Nikolay

  • Hero Member
  • *****
  • Posts: 1101
    • UnmanagedVisio
Re: (Urgent) How to Enable "Ctrl+Z" (undo) funtion in Macros..?
« Reply #2 on: December 03, 2013, 07:46:03 AM »
Probably you macro does many changes to the drawing, and when you click undo (Ctrl+Z) only the last step is undone.
You can verify this by clicking "Ctrl+Z" multiple times, or by looking at the content of the undo queue (under the undo button)

To undo all actions, you could scope all actions in one batch, using
Application.BeginUndoScope / Application.EndUndoScope

Venkatesh

  • Newbie
  • *
  • Posts: 7
Re: (Urgent) How to Enable "Ctrl+Z" (undo) funtion in Macros..?
« Reply #3 on: December 03, 2013, 08:56:07 AM »
@ Paul Herber:

Thanks for your response.. Could you please tell where i can find your Macro..?

Venkatesh

  • Newbie
  • *
  • Posts: 7
Re: (Urgent) How to Enable "Ctrl+Z" (undo) funtion in Macros..?
« Reply #4 on: December 03, 2013, 08:59:36 AM »
@Nikolay :

Thanks 4 ur response... I am running the Macro to change the existing line(default) format into some specific format...Thats all.. But undo operation cannot be done after/before running the Macro... Could you please suggest in detail how best i can do it ..?

Thanks in Advance..