BuiltIn Property

Microsoft Office Visual Basic

True if the specified command bar or command bar control is a built-in command bar or control of the container application. False if it's a custom command bar or control, or if it's a built-in control whose OnAction property has been set. Read-only Boolean.

Example

This example deletes all custom command bars that aren't visible.

foundFlag = False
deletedBars = 0
For Each bar In CommandBars
    If (bar.BuiltIn = False) And (bar.Visible = False) Then
        bar.Delete
        foundFlag = True
        deletedBars = deletedBars + 1
    End If
Next
If Not foundFlag Then
    MsgBox "No command bars have been deleted."
Else
    MsgBox deletedBars & " custom command bar(s) deleted."
End If