Visible Property

Applies To

Assistant object, CommandBar object, CommandBarButton object, CommandBarComboBox object, CommandBarControl object, CommandBarPopup object.

Description

CommandBar and CommandBarControl object: True if the specified command bar or command bar control is visible. Read/write Boolean.

Assistant object: True if the Office Assistant is visible. Read/write Boolean.

Remarks

The Visible property for newly created custom command bars is False by default.

The Enabled property for a command bar must be set to True before the visible property is set to True.

See Also

Add Method (CommandBarControls collection), Add Method (CommandBars collection).

Example

This example steps through the collection of command bars to find the Forms command bar. If the Forms command bar is found, the example makes it visible and protects its docking state.

foundFlag = False
For Each cmdbar In CommandBars
    If cmdbar.Name = "Forms" Then
        cmdbar.Protection = msoBarNoChangeDock
        cmdbar.Visible = True
        foundFlag = True
    End If
Next
If Not foundFlag Then
    MsgBox "'Forms'command bar is not in the collection."
End If
This example makes the Office Assistant visible and sets its animation.

With Application.Assistant
    .Visible = True
    .Sounds = True
    .Animation = msoAnimationBeginSpeaking
End With