How to Close Microsoft Excel Using DDE Commands in FoxProLast reviewed: April 29, 1996Article ID: Q95718 |
The information in this article applies to:
SUMMARYThe code below demonstrates how use dynamic data exchange (DDE) commands to close Microsoft Excel from within FoxPro for Windows. The commands below assume that the DDE link with Microsoft Excel has already been established using the DDEInitiate() command.
MORE INFORMATIONTo close Microsoft Excel without saving changes:
=DDEExecute(<Channel>,"[Error(False)]") =DDEExecute(<Channel>,"[Quit()]")To close Microsoft Excel and be prompted to save changes:
=DDEExecute(<Channel>,"[Close.All()]") =DDEExecute(<Channel>,"[Error(False)]") =DDEExecute(<Channel>,"[Quit()]")To close Microsoft Excel and save changes without being prompted:
=DDEExecute(<Channel>,"[Save()]") =DDEExecute(<Channel>,"[Close.All()]") =DDEExecute(<Channel>,"[Error(False)]") =DDEExecute(<Channel>,"[Quit()]") NOTE: The above code to close Microsoft Excel and save changes without prompting will work if only the top spreadsheet needs saving. If additional spreadsheets also need to be saved, prompting will occur. |
Additional reference words: FoxWin 2.50 2.50a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |