The following procedures describe how to create a new empty VBA project:
1. From the Tools menu, choose MacroVBA Manager.
The VBA Manager dialog box should now be displayed.
2. Click the New button on the right side of the dialog box.
If no projects were previously loaded, a new project named ACADProject
is added to the Projects list box with the location of Global1.
3. Select the new project in the Projects list box.
4. Click the Save As button on the right side of the dialog box.
The Save As dialog box is displayed, allowing you to specify a filename
and location for the new VBA project.
5. Browse to the My Documents folder using the Save In drop-down list.
6. Enter FirstVBAProject in the File Name field of the Save As dialog box.
7. Click the Save button in the Save As dialog box.
The empty VBA project is saved to the My Documents folder. The loca-
tion and filename that the project is saved to are reflected in the VBA
Manager dialog box under the Location column.
Working with the new VBA project in the editor
Here is how to launch the Visual Basic Editor and work in the new project:
1. Select the new project in the Projects list box.
2. Click the Visual Basic Editor button on the bottom of the VBA Manager
dialog box.
The Visual Basic Editor should be launched and be displayed on-screen.
If it is not brought up on-screen, check the Windows taskbar to see
whether it is minimized.
3. In the Project Explorer, select the top node ACADProject, which repre-
sents the project.
In the Properties window (see Figure 4-12), the properties for the project
should be listed. A project has one property that can be modified from
the Properties window, and that is Name.
4. Highlight the current value of ACADProject in the Name field in the
Properties Window and enter FirstVBAProject.
This changes the name that appears in the VBA Manager dialog box and
the Macros dialog box. Using a unique name lets you distinguish the
project from other loaded projects.

Tidak ada komentar:
Posting Komentar