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.