Returns the name of the toolbar.
Read-only property
variable = object.Name |
String
IsToolBarPresent returns True if the specified toolbar is present; False if not. HideToolBar hides the specified toolbar if it is present.
ToolBar Example (VBScript) | Copy Code |
---|---|
Function IsToolBarPresent (strTBName) Dim blnExists blnExists = False For each T in Application.Toolbars If T.Name = strTBName Then blnExists = True Exit For End If Next IsToolBarPresent = blnExists End Function Sub HideToolBar (strTBName) If IsToolBarPresent (strTBName) Then Application.ToolBars(strTBName).Visible = False End If End Sub |