Excel: Communication Between Excel and Access Using DDELast reviewed: September 12, 1996Article ID: Q99845 |
The information in this article applies to:
SUMMARYThis article contains examples that demonstrate how Microsoft Excel and Microsoft Access can communicate through dynamic data exchange (DDE). The first example discusses a macro developed for Microsoft Excel version 4.0 for Windows that starts Microsoft Access, loads a database, and runs a macro. The second example discusses a Microsoft Access Basic function that loads Microsoft Excel and runs a macro.
MORE INFORMATION
Running a Microsoft Access Macro from Microsoft ExcelTo run a Microsoft Access macro from Microsoft Excel, do the following (note that these steps assume that a macro called MESSAGE already exists in Microsoft Access):
The EXECUTE() function runs a macro named MESSAGE, as follows:
Name Summary ------------ Application Name: "MSACCESS" Window Title: "Microsoft Access" Topic: "System" Item: "Message" Running a Microsoft Excel Macro from Microsoft AccessTo run a Microsoft Excel macro from Microsoft Access, do the following (note that these steps assume that a macro named Message already exists in a Microsoft Excel macro sheet named MACRO1.XLM):
The EXECUTE() function runs a macro named Message.
Name Summary ------------ Application Name: "Excel" Window Title: "Microsoft Excel" Topic: "System" Item: "[Run(""macro1.xlm!Message"")]"The syntax for these two macros demonstrates that the correct syntax for the "Item" depends on the target application.
REFERENCESMicrosoft Access README.TXT Microsoft Excel "Function Reference"
|
KBCategory: kbinterop
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |