OpenSheetAsDocument
PowerScript function
Description
Opens a sheet as a document within an MDI frame window for dockable
windows.
Applies to
Window objects
Syntax
|
1 |
OpenSheetAsDocument ( sheetrefvar {, windowtype }, mdiframe, sheetname {, tabalign } ) |
|
Argument |
Description |
|---|---|
|
sheetrefvar |
The name of any window variable that is not an MDI frame |
|
windowtype (optional) |
A string whose value is the datatype of the window you |
|
mdiframe |
The name of an MDI frame window. |
|
sheetname |
A unique string identifier for the sheet, which is used |
|
tabalign (optional) |
A boolean that, when used, creates a new tab group and |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, OpenSheetAsDocument returns null. In some cases,
such as if the windowtype argument is invalid, OpenSheetAsDocument throws
a runtime error and does not return a value; therefore, it is recommended
that you both test the return value and wrap the function call in a
try-catch block.
Usage
Tabbed documents can be in more than one tab group. Users can create
additional tab groups by dragging one tab outside of the current group. If
there is more than one tab group, use the mdiframe argument to specify in
which one to open a sheet. Instead of specifying the parent window,
specify an already open sheet in the tab group where you want to open your
new sheet.