NextLibWindow Method

Returns an instance of the Window object corresponding to the next library window in the window collection of the application.

Applies to: Application object

Syntax

[[Set] libWindowRet =] object.NextLibWindow ()

The NextLibWindow method syntax has these parts:

Part Description
object Required. An expression, that returns an instance of the Application object.

libWindowRet

Optional. A Window type variable.

Remarks

Note, that FirstLibWindow method must be called prior to using the NextLibWindow method, otherwise the NextLibWindow method will return Nothing. The NextLibWindow method also returns Nothing when the end of the list of the library windows has been reached. It's convenient to use the NextLibWindow method together with the FirstLibWindow method to go through all library winodws open in the application.

Example

This example contains a application-level script. The script displays the list of library windows and the list of libraries in each window.

' Declare variables
Dim lib_wnd As Window
Dim i As Integer

' Get the first library window
Set lib_wnd = thisApp.FirstLibWindow()

TRACE "==============================="
While lib_wnd <> Null
    ' Display the ID of the window
    TRACE "ID = " & lib_wnd.ID & " :"

    ' Display the list of libraries in the current library window
    For i=1 To lib_wnd.LibsNum()
        TRACE "            - " & lib_wnd.Lib(i).Title
    Next i
    
    ' Get next library window
    Set lib_wnd = thisApp.NextLibWindow()
Wend
TRACE "==============================="

 

See Also

FirstLibWindow method, LibWindowByID method, LibWindowsNum method, Window object