Ask Your Question
1

How does one interrupt a running macro?

asked 2018-01-08 01:52:23 +0200

theGeeko61 gravatar image

I'm studying LibreOffice Basic for macros. I have a long-running macro which, once I determine a bug, I would like to abort the macro. I've tried CTRL-C but that does not work. I'm running on Linux, if that matters. I am grateful for any insight into this issue.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2018-01-08 06:03:08 +0200

Ratslinger gravatar image

Hello,

Much of the information regarding LO can be found in the many locations of LO help. Off-line help (if you installed it) states to use Ctrl+Shift+Q from within the Basic IDE. Shift+F5 also works in the IDE as well as pushing the Stop Macro toolbar button.

If this answers your question please tick the ✔ (upper left area of answer). It helps others to know there was an accepted answer.

edit flag offensive delete link more

Comments

This is the correct answer. Although it's in the offline documentation, I could not find it online. The only official information online is the bug report at https://bz.apache.org/ooo/show_bug.cg....

Jim K gravatar imageJim K ( 2018-01-08 22:49:55 +0200 )edit

For online see the 5.4 Help which came from here. The Shift+F5 came from hovering the mouse over the Stop icon.

Ratslinger gravatar imageRatslinger ( 2018-01-08 23:17:04 +0200 )edit
0

answered 2018-01-08 11:31:09 +0200

librebel gravatar image

Hello @theGeeko61,

For simple debugging i often just use the msgbox() function.

Code execution is halted until the msgbox dialog is dismissed.

So you could temporarily insert the following line into your code, at all places where you would like to be able to stop the macro:

If msgbox( "Should we STOP the Macro here?", 36 ) = 6 Then Stop

HTH, lib

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-01-08 01:52:23 +0200

Seen: 485 times

Last updated: Jan 08 '18