How do I make sure that the
My Macros & Dialogs libraries are initialized before my Document’s
WhenLoading event fires?
Here’s the deal: For Form initialization I use the
WhenLoading event. It calls a sub in
My Macros & Dialogs to help do it’s work. At first, it can’t find the sub in
My Macros & Dialogs; then later it can find it, without changing anything at all. 8-|
This is the error message: Click OK, and almost magically, this error goes away until I re-start LO. When I say it starts working properly, I mean if I enter and exit design mode to re-fire the WhenLoading event, I don’t see this error on successive firings of the event. I only see it when I first start up LO.
It seems to fail only if the event handler calls a sub in a shared library as part of it’s work. In this case I’m calling this helper subroutine:
My Macros & Dialogs, "Lookup.Lookup.WhenLoading_"
My event handler works consistently if located entirely in the Document’s
My event handler is this
Finally, there is this little temporarily S icon in the Object Catalog marking the subroutine library I am trying to call. If I click on the library to view it’s modules the “S” goes away.