What is the difference between Dialog.EndExecute and Dialog.Dispose?

What is the difference between Dialog.EndExecute and Dialog.Dispose ? Which of them should I use if I execute the same dialog many times? LO 5.4.6.2, Windows 10. Thanks in advance.

What is meant by “…execute the same dialog many times?”. Execute then again execute so the same dialog is open in two instances? If so, what is purpose?

No, Execute, then EndExecute (or Dispose?), then Execute and EndExecute again, and so on many times. Can this process take too much resources? For some reason I have to use macro to end dialog.

It depends upon your dialog and what is being done. As for needing a macro to end it, are you using an OK button in the dialog? How is the dialog constructed & run?

Hello,

Normally in a dialog you have a button assigned to OK which ends the execution of the dialog. If no OK button is present and macro code is used, then use endExecute. dispose is to free resources which is typically not necessary.

Can you give an example of Not typically?

Please see definition → dispose

If you are having a problem use myDialog.endExecute() followed by myDialog.dispose() or if you have an OK button, follow the myDialog.Execute() with myDialog.dispose().