Microsoft KB Archive/95718

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5, 2.5a

-

SUMMARY
The 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 INFORMATION
To close Microsoft Excel without saving changes:

  =DDEExecute(,&quot;[Error(False)]&quot;) =DDEExecute(,&quot;[Quit]&quot;) To close Microsoft Excel and be prompted to save changes:   =DDEExecute(,&quot;[Close.All]&quot;) =DDEExecute(,&quot;[Error(False)]&quot;) =DDEExecute(,&quot;[Quit]&quot;) To close Microsoft Excel and save changes without being prompted:   =DDEExecute(,&quot;[Save]&quot;) =DDEExecute(,&quot;[Close.All]&quot;) =DDEExecute(,&quot;[Error(False)]&quot;) =DDEExecute(,&quot;[Quit]&quot;) 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 query words: FoxWin 2.50

Keywords         : FxinteropDde Version          : 2.50 2.50a Platform         : WINDOWS Issue type       :
 * }