ACC: Sample DDE Macro Communicates with Microsoft Excel 4.0Last reviewed: June 6, 1997Article ID: Q97522 |
The information in this article applies to:
SUMMARYAdvanced: Requires expert coding, interoperability, and multiuser skills. The text below demonstrates communication between two applications through dynamic data exchange (DDE). Specifically, one example shows a macro developed for Microsoft Excel version 4.0 for Windows that starts Microsoft Access, loads a database and runs a macro. A second example shows an Access Basic function that loads Microsoft Excel and runs a macro.
MORE INFORMATION
Running a Microsoft Access Macro from Microsoft ExcelPerform the following three steps to demonstrate this behavior. These steps assume that a "MESSAGE" macro 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 AccessPerform the following two steps to demonstrate this behavior. 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.
REFERENCES"Microsoft Excel Function Reference", version 4.0, pages 14 - 15 |
Keywords : IntpDde kbinterop McrHowto
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |