VBE property

Microsoft Visio Developer Reference

VBE property

        object;DAR_Objects_(A-M)_1015.htm">

Gets the root object of the object model exposed by Microsoft Visual Basic for Applications (VBA). Use this property to access and manipulate the VBA projects associated with currently open Microsoft Visio documents.

Version added

4.5

Syntax

objRet = object.VBE

objRet

Programmable object that exposes VBA methods and properties.

object

Required. An expression that returns an Application object.

Remarks

To get information about the object returned by the VBE property:

  1. On the Tools menu, point to Macros, and then click Visual Basic Editor.
  1. In the Visual Basic Editor, on the Tools menu, click References.
  1. In the References dialog box, click Microsoft Visual Basic for Applications Extensibility, and then click OK.
  1. On the View menu, click Object Browser.
  1. In the Project/Library list, select the VBIDE type library.
  1. In the Classes list, examine the class named VBE.

Beginning with Microsoft Visio 2002, the VBE property raises an exception if you are running in a secure environment and your system administrator has blocked access to the VBA object model. There is no user interface or programmatic way to turn this on—the system administrator must turn on (or off) access via a Group Policy. This is a protection mechanism against viruses that spread by accessing the Visual Basic projects in commonly used templates and injecting the virus code into them.