Saving a VBA program

Other topics about Operation Basics

Overview

You can save VBA programs either as one complete project or on a module by module basis.

Saving a Project

When you opt to save your program as one complete project, you can have the files (modules) making up the project into a single package. A project is saved as a .vba file. You can save your program to a project file using one of the following two methods:

Saving a Project from Visual Basic Editor

  1. Open the Save As dialog box by doing one of the following:

  2.  The Save As dialog box appears. Specify the file name and location (drive or folder) and click Save.

E5071C Saving a Project from the E5071C Measurement Screen

  1. Display the E5071C measurement screen following the instructions given in Switching to the E5071C Measurement Screen.

  2. Open the Save As dialog box using the following key sequence:

  3. The Save As dialog box appears. Specify the file name and location (drive or folder) and click Save.

Saving a Module (Exporting)

Alternatively, you can save each module (user form, standard, or class) of your VBA program individually. To save a module, you must use Visual Basic Editor. User forms are saved as .frm files, standard modules as .bas files, and class modules as .cls files.

  1. In Project Explorer, click the file name that appears under the desired module icon to highlight it.

  2. Open the Export File dialog box by doing one of the following:

  3. The Export File dialog box appears. Specify the file name and location (drive or folder) and click Save.