Saving a VBA program
Overview
•
Saving a Project
•
Saving a Module (Exporting)
•
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:
On the File menu, click Save xxx.VBA. "xxx" represents the file
•
name.
On the toolbar, click "Save Project File" icon.
•
Press
•
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:
•
Macro Setup
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.
a. In Project Explorer, click the file name that appears under the
desired module icon to highlight it.
+
keys on the keyboard.
Ctrl
S
> Save Project
Programming
1331