Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, I definately needed a dialog. In particular, I needed a non-modal dialoge. If you're not familiar with this term, it means a dialog that allows the user to interact with the underying application (in my case Base) while the dialoge is on the screen. I was using the dialog to pause the macro so the user could pick a selection from a Base listbox and then use that selection for futher processing in the macro. Typically, a dialog is modal, so knowing how to make one that's not modal is a handy little skill to have. Fortunately, a method of doing this has already been posted on this forum. See this link:

I was able to basically drop this code in my macro, and get it to work with minimal modification. The main issue was just gettiing it to work with my particular macro/dialog library structure. If you're not very experienced with LO VBA (like me) it's also good to know that you also have to declare the Global variables at the beginning of your macro before any sub routines. He only has one in his code (global Continue As Boolean). The only other thing I had to do is copy the dialog from his sample code and place it in the same document (in the standard macro library for the document, not the actual document) that contained the macro I was working on. Easy Peasy.

Thanks to pierre-yves samyn for posting his sample code. docbda