How to stop office stopping when macros take too long?

I have a macro that takes ages to run (it’s fetching lots of internet pages). Libreoffice decides it’s crashed and asks if I wish to wait or shut it down. I don’t want this as it takes forever to get it to complete. Is there a way to stop this happening?

Tips:

  • Just write better macros.
  • And do not use endless cycles.
  • Try to write some watchdog-like function in the macro.
  • Upload the macro code here. Then we will able to examine it.

This macro is fetching around 500 pages. I was hoping their was a yield type call I could make.

I’m also hoping that this can be left unattended as it’ll probably take over 30 mins (or maybe hours) to run so a watchdog timer solution isn’t applicable.