GlobalScope /text/sbasic/shared/03131900.xhp Sun Microsystems, Inc.
GlobalScope function library systems LibraryContainer GlobalScope API; BasicLibraries API; DialogLibraries BasicLibraries; library container DialogLibraries; library container

GlobalScope

To manage personal or shared library containers (%PRODUCTNAME Macros or My Macros) from within a document, use the keyword GlobalScope.
Basic source code and dialogs are organized in library containers. Libraries can contain modules and dialogs.

In Basic:

A Basic library can be managed with BasicLibraries keyword.

In dialogs:

A dialog library can be managed with DialogLibraries keyword. Both containers exist in an application level and within every document. In the document Basic, the document's library containers are called automatically. If you want to call a global library container (located in %PRODUCTNAME Macros or My Macros) from within a document, you must use the keyword GlobalScope. GlobalScope Example in the document Basic ' calling Dialog1 in the document library Standard oDlgDesc = DialogLibraries.Standard.Dialog1 ' calling Dialog2 in the application library Library1 oDlgDesc = GlobalScope.DialogLibraries.Library1.Dialog2