This example determines how many Toolbars are available to the active session (with the aid of the Count property), and then lists them (with the aid of the Item method).
Sub Main()
Dim Sys As Object, Sess As Object, TBars As Object
Set Sys = CreateObject("EXTRA.System")
' Assumes an open session
Set Sess = Sys.ActiveSession
' This example uses the Toolbars property to:
' 1) get the number of Toolbars (with the aid of the Count
' property)
' 2) list them (with the aid of the Item method).
TBarCount = Sess.Toolbars.Count
For i = 1 to TBarCount
TBarNames$ = TBarNames$ + Sess.Toolbars.Item(i).Name + " "
Next
MsgBox "The number of Toolbars = " + TBarCount + ". They are: " + TBarNames$
End Sub