VBE Properties

Name

Returns

Description

ActiveCodePane

CodePane

Returns or sets the CodePane currently being edited by the user. Typically used to identify which object is being worked on, or to force the user to work with a specific code pane.

ActiveVBProject

VBProject

Returns or sets the VBProject selected in the Project Explorer window. If the Project Explorer is showing a VBComponent selected, this property returns the VBProject containing the component.

ActiveWindow

Window

Read-only. Returns the active Window, which may be a code pane, designer, or one of the VBIDE windows (such as Project Explorer, Immediate window, and so on).

Addins

Addins

Read-only. Returns a collection of all the COM Add-Ins registered for use in the VBIDE. See the Addln object for more information.

CodePanes

CodePanes

Read-only. Returns a collection of all the open CodePanes in the VBIDE. See the CodePane object for more information.

CommandBars

Command Bars

Read-only. Returns a collection of all the command bars in the VBIDE.

Events

Events

Read-only. Returns an object containing all the events in the VBIDE. See the Events object for more information.

MainWindow

Window

Read-only. Returns a Window object representing the main window of the VBIDE.

Name

Returns

Description

SelectedVB Component

VBComponent

Read-only. Returns the VBComponent object that is shown as selected in the Project Explorer window. Note that this usually, but not always, corresponds to the ActiveCodePane.

VBProjects

VBProjects

Read-only. Returns a collection of all the VBProjects in the VBIDE, both Excel workbooks and ActiveX DLLs.

Version

String

Read-only. Returns the version number of the Extensibility library (shows 6.05 for Office 2007).

Windows

Windows

Read-only. Returns a collection of all the open windows in the VBIDE. See the Windows object for more information.

Most of the examples in this section and in Chapter 26 include the VBE's properties. The following line displays the VBE:

Application.VBE

MainWindow.Visible = True

Was this article helpful?

0 0

Post a comment