Adding a wait time to sub

Update: Solution was found by the suggestion from Shelby Moore

.Hey there, So I have created a VBA macro, and I could use some feedback and advice on how to correct a crashing issue. The outline of the macro is below.

  1. The Macro loops through each page in a document.
  2. On each page it ungroups all groups.
  3. Finds the two objects named "Male Arc" & "Male Notch".
  4. Then it Recolors, groups, and rotates the group.

This works fine on smaller files with around 50 pages but when I tried a production document with around 400 pages it made CorelDraw crash.

I was thinking if I could add a delay on each page, it might help and not send the program it an unresponsive state then crash.

Any advice on how to resolve this would be greatly appreciated.

Parents
No Data
Reply
  • What is probably happening is that, due to the number of pages, your computer must not have enough resources and has reached the maximum limit of available RAM. You may need to set CorelDRAW as a top priority in the task manager, but beware, this may cause the system to quit unexpectedly!

Children
No Data