ACC: How to Convert Macros to Visual Basic for Applications
ID: Q136058
|
The information in this article applies to:
-
Microsoft Access versions 7.0, 97
SUMMARY
Moderate: Requires basic macro, coding, and interoperability skills.
You can do a lot with macros. You can open and close forms, show and hide
toolbars, and run reports. However, if you want more control over your
application's behavior, you can convert your macros to Visual Basic for
Applications code. To help you convert existing macros to Visual Basic for
Applications code, you can use the Microsoft Access Macro Conversion
Wizard. This article explains how to use the Macro Conversion Wizard, and
how it converts your macro actions.
MORE INFORMATION
To convert a macro to Visual Basic for Applications code, follow these
steps:
- Open the sample database Northwind.mdb.
- In the Database window, click the Macros tab, and select a macro, for
example, the Customer Labels Dialog macro.
- On the File menu, click Save As/Export.
- In the Save As box, click Save As Visual Basic Module, and then click
OK.
- In the Convert Macro box, select the "Add error handling/trapping to
generated functions" option and the "Include macro comments"
option.
- Click Convert.
The Macro Conversion Wizard does the following when it converts a macro to
Visual Basic code:
REFERENCES
For more information about converting macros to Visual Basic for
Applications code, search in the Help Index for "converting macros," or
ask the Microsoft Access 97 Office Assistant.
Additional query words:
Keywords : kbprg
Version : WINDOWS:7.0,97
Platform : WINDOWS
Issue type : kbinfo
|