+ Reply to Thread
Results 1 to 2 of 2

How to Stop a Macro Safely?

  1. #1
    Registered User
    Join Date
    06-19-2007
    Posts
    6

    How to Stop a Macro Safely?

    I have a for loop and while the macro is running I see an hour glass icon represents loading and does not let me click on any buttons, however I am trying to safely get out of the loop without hitting Ctr + Pause. Does anyone have any experience with this. On top of my for loop I have an if statement.

    Please Login or Register  to view this content.
    And if the stop button is pressed it will make stopkey = "1" however I am unable to press it during when the macro is running.

    Any help, thanks.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Have a look at doevents.

    Say you have something like

    Please Login or Register  to view this content.
    Make sure there is nothing in A1, run the code and it will keep incrementing B1. While it is running, you will be able to go to A1, and enter 1. The macro will stop.

    HTH

    rylo

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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