Search notes:

Microsoft Office: Visual Basic Editor

Keyboard shortcuts

Alt+F11 takes one from an Office application to the Visual Basic Editor.
From the Visual Basic Editor, the immediate window can be opened with Ctrl-G.
The Object Browser is opened with F2.

Renaming modules

Apparently, code modules cannot be renamed with a right mouse click. Instead. the module needs to be selected and its name then changed in the properties window in the lower left corner.

Module name equal to sub name

It seems that some problems might be caused if the name of a module is equal to the name of a sub. When the sub is called from the immediate window with call subName, it causes the »compile error« Expected variable or procedure, not module.
This «problem» can be circumvented by qualifying the sub name: call equalName.equalName

Jumping to the definition of a sub or function

At least in Excel, it's possible to jump to the definition of a sub or function using application.goto … by giving it the name of the sub or procedure.
application.goto "nameOfSub", scroll = true

Opening VB Editor with VBA

application.commandBars.executeMso "VisualBasic"

Automatically opening the VB Editor when an Office App is started

In order to have the VB editor automatically opened when Excel is started, the following macro can be used (Apparently, in Word, AutoOpen rather than auto_open is needed). (2019-09-11: I was just informed that these two events are obsolete).
sub auto_open()
  application.vbe.mainWindow.visible = true
end sub

Windows class name

The class name for the Windows class that can be used in the WinAPI functions FindWindow or FindWindowEx is wndclass_desked_gsk.

See also

Positioning the VB Editor programmatically, for example with VBA.
VB Editor Object Model
VBA

Index