O'Reilly logo

How to Implement Market Models Using VBA by François Goossens

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

CHAPTER 1

The Basics of VBA Programming

1.1 GETTING STARTED

To access the VBA editor, point to the Developer (VBA menu on the ribbon). In case this menu is not visible, proceed like this:

Office 2007 Click the Microsoft Office Button

image

then click on Excel Options (bottom right). Point to Popular and mark Show Developer tab in the Ribbon check box, then OK: the Developer tab is now displayed on the ribbon

Office 2010 and beyond Point the File menu and select Options

Click on Customize Ribbon, and mark Developer

image

When you click on Developer, Excel displays a minimum of three groups:

  • Code: this is the group from which you open the VBA editor
  • Controls: user interface components, to create Windows-like applications
  • XML: converts XML files into Excel files and vice versa.

From the Code group, click on “Visual basic” icon (far left). If you work on a newly created file, the VBA editor looks like this:

image

The bar on the top provides three especially useful menus:

  • View: a menu that lists windows editing information regarding the code execution. Also hides or shows the project explorer (on the left). At creation, the project reduces to three open sheets and an empty module named ThisWorkbook ...

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