The information in this article applies to:
SUMMARY
Moderate: Requires basic macro, coding, and interoperability skills.
MORE INFORMATIONThe following code demonstrates how to run a macro called "MyMacro" in Microsoft Access from a Visual Basic application.
To use this code, create a new Visual Basic program with a text box and a command button with the following properties:
Double-click the command button and enter the code example listed
above between the "Sub Command1_Click ()" and "End Sub" lines.
When you run this example, be sure that Microsoft Access is running and that a database containing a macro called "MyMacro" is open. For testing purposes, you may want to create a macro called "MyMacro" that contains a single MsgBox action. NOTE: While the above example uses the Microsoft Access system Topic listed in the LinkTopic line, Microsoft Access is capable of running a macro with virtually every valid topic it supports. For a list of topics that Microsoft Access supports, please see the following article here in the Microsoft Knowledge Base: Q96845 How to Use DDE to Display Microsoft Access Data in VB 3.0 Additional query words:
Keywords : kbinterop |
Last Reviewed: November 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |