O'Reilly logo

Excel Scientific and Engineering Cookbook by David M Bourg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.1. Navigating the VBA Editor

Problem

You want to start exploring the Visual Basic for Applications (VBA) language and don't know where to begin.

Solution

Open Excel and select Tools → Macro → Visual Basic Editor from the main menu bar to open the VBA integrated development environment (IDE ). Start exploring the IDE as described in the following discussion.

Discussion

The VBA IDE is basically the VBA editor. It's where to write VBA code, manage code modules , and debug your code. The editor allows you to perform all these development tasks in a single, integrated application. You can access the IDE using the menu as mentioned earlier or you can use the shortcut Alt-F11. You can also use the Visual Basic toolbar, shown in Figure 2-1.

Visual Basic toolbar

Figure 2-1. Visual Basic toolbar

The IDE looks very much like any other Windows application, with a menu at the top, toolbars, and child windows in the client area of the window, as shown in Figure 2-2.

The VBA IDE is a multiple-document interface style of window. The area below the toolbars and menu is called the client area, which acts as a container for all the other (child) windows to be displayed within the IDE.

Within the client area of the VBA IDE shown in Figure 2-2, there are three panels or windows. The panel in the upper left is called the project panel, or project explorer window. It shows an Explorer-like view of all the currently open VBA projects. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required