Type Property

Microsoft Office Visual Basic

Returns the type of command bar. Read-only MsoBarType.

MsoBarType can be one of these MsoBarType constants.
msoBarTypeMenuBar
msoBarTypeNormal
msoBarTypePopup

expression.Type

expression    Required. An expression that returns a CommandBar object.

ShowType property as it applies to the CommandBarButton, CommandBarComboBox, CommandBarControl, and CommandBarPopup objects.

Returns the type of command bar control. Read-only MsoControlType.

MsoControlType can be one of these MsoControlType constants.
msoControlActiveX
msoControlAutoCompleteCombo
msoControlButton
msoControlButtonDropdown
msoControlButtonPopup
msoControlComboBox
msoControlCustom
msoControlDropdown
msoControlEdit
msoControlExpandingGrid
msoControlGauge
msoControlGenericDropdown
msoControlGraphicCombo
msoControlGraphicDropdown
msoControlGraphicPopup
msoControlGrid
msoControlLabel
msoControlLabelEx
msoControlOCXDropdown
msoControlPane
msoControlPopup
msoControlSpinner
msoControlSplitButtonMRUPopup
msoControlSplitButtonPopup
msoControlSplitDropdown
msoControlSplitExpandingGrid
msoControlWorkPane

expression.Type

expression    Required. An expression that returns one of the above objects.

ShowType property as it applies to the SearchScope object.

Returns a value that corresponds to the type of SearchScope object. The type indicates the area in which the Execute method of the FileSearch object will search for files. Read-only MsoSearchIn.

MsoSearchIn can be one of these MsoSearchIn constants.
msoSearchInCustom
msoSearchInMyComputer
msoSearchInMyNetworkPlaces
msoSearchInOutlook

expression.Type

expression    Required. An expression that returns a SearchScope object.

ShowType property as it applies to the DocumentProperty object.

Returns or sets the document property type. Read-only for built-in document properties; read/write for custom document properties.

expression.Type

expression    Required. An expression that returns a DocumentProperty object.

Remarks

The return value will be a MsoDocProperties constant.

MsoDocProperties can be one of these MsoDocProperties constants.
msoPropertyTypeBoolean
msoPropertyTypeDate
msoPropertyTypeFloat
msoPropertyTypeNumber
msoPropertyTypeString

Example

ShowAs it applies to the CommandBar object.

This example finds the first control on the command bar named Custom. Using the Type property, the example determines whether the control is a button. If the control is a button, the example copies the face of the Copy button (on the Standard toolbar) and then pastes it onto the control.

Set oldCtrl = CommandBars("Custom").Controls(1)
If oldCtrl.Type = msoControlButton Then
    Set newCtrl = CommandBars.FindControl(Type:= _
        MsoControlButton, ID:= _
        CommandBars("Standard").Controls("Copy").ID)
    NewCtrl.CopyFace
    OldCtrl.PasteFace
End If
				

As it applies to the DocumentProperty object.

This example displays the name, type, and value of a document property. You must pass a valid DocumentProperty object to the procedure.

Sub DisplayPropertyInfo(dp As DocumentProperty)
    MsgBox "value = " & dp.Value & Chr(13) & _
        "type = " & dp.Type & Chr(13) & _
        "name = " & dp.Name
End Sub