To manage personal or shared library containers (%PRODUCTNAME Macros or My Macros) from within a document, use the GlobalScope specifier.Basic source code and dialogs are organized in library containers. Libraries can contain modules and dialogs.
In Basic:
Basic libraries and modules can be managed with the BasicLibraries object. Libraries can be searched, explored and loaded on request. Monitoring Documents Events illustrates %PRODUCTNAME library loading.
In dialogs:
Dialog libraries and dialogs can be managed with the DialogLibraries object. Opening a Dialog With Basic illustrates how to display %PRODUCTNAME shared dialogs.BasicLibraries and DialogLibraries containers exist at application level and within every document. Document's library containers do not need the GlobalScope specifier to be managed. If you want to call a global library container (located in %PRODUCTNAME Macros or My Macros) from within a document, you must use the GlobalScope specifier.GlobalScope specifierExample in the document Basic' calling Dialog1 in the document library StandardoDlgDesc = DialogLibraries.Standard.Dialog1' calling Dialog2 in the application library Library1oDlgDesc = GlobalScope.DialogLibraries.Library1.Dialog2