Loading a VBA Program

Other topics about Operation Basics

Overview

Once you have saved a project or module file, you can load it later whenever necessary.

Loading a Project

You can load a saved project file either from the E5071C measurement screen or by specifying that the project file be automatically loaded when the power is turned on.

Loading a Project from the E5071C Measurement Screen

  1. Press Macro Setup key, then click Load Project.

  2. The Open dialog box appears. Specify the file name and location (drive or folder) of the file you want to load and click Open.

 Open dialog box

The Open dialog box has the following user interface elements:

  1. Look in: Specify the location (drive or folder) where the project resides.

  2. File name: Specify the file name of the project you want to load.

  3. Files of type: Select the type of the file you want load. Normally, you should select VBA Project Files [*.vba].

  4. Open: Clicking this button loads the project.

  5. Cancel: Clicking this button closes the Open dialog box and brings you back to the main screen.

Automatically Loading a Project at Power-On

Once you have saved a project file that satisfies the following conditions, the project will be automatically loaded whenever the power is turned ON.

Auto-loaded project

Conditions

Directory where the project resides.

A:\ or D:\

Project file name

autoload.vba

If there is the file named "autoload.vba" in both the A drive and the D drive, the file in the A drive is used.

Loading a Module (Importing)

To load a saved module into a project, you must use Visual Basic Editor.

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

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

  3.  The Import File dialog box appears. Specify the file name and location (drive or folder) of the file (module) you want to load and click Open.

  4. The Import File dialog box has the following user interface elements:

 Import File dialog box

The Import File dialog box has the following user interface elements:

  1. Look in: Specify the location (drive or folder) where the module resides.

  2. File name: Specify the file name of the module you want to load.

  3. Files of type: Select the type of the file you want load. Normally, you should select VB Files [*.frm,*.bas,*.cls].

  4. Open: Clicking this button loads the module.

  5. Cancel: Clicking this button closes the Import File dialog box and brings you back to the main screen.

  6. Help: Clicking this button brings up VBA Online Help.