SelectedVBComponent Property

Applies To

VBE object.

Description

Returns the selected component. Read-only.

Remarks

The SelectedVBComponent property returns the selected component in the Project window. If the selected item in the Project window isn't a component, SelectedVBComponent returns Nothing.

See Also

ActiveVBProject property, VBComponent object, VBComponents collection.

Example

The following example uses the SelectedVBComponent property to return the selected component.

Debug.Print Application.VBE.SelectedVBComponent.Name