Visible Property 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