Microsoft KB Archive/129791

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft FoxPro for Windows, version 2.6a

-

SUMMARY
This article gives a convenient way to obtain the version of Microsoft Excel to which a DDE channel has been established in a FoxPro for Windows application.

MORE INFORMATION
In the following example, the Microsoft Excel INFO function is poked into a cell in the Microsoft Excel spreadsheet to which a DDE channel has been established. The value of this function is then returned to FoxPro. Sheet1 is the name of the worksheet used in the example, and Row 1 Column 1 (R1C1) was arbitrarily chosen to hold the function. Both of these choices can be modified at the developer's discretion.

Code Sample
To demonstrate this code example, type the following into a new program file (.PRG file) and run it:    channel = ddeinitiate('Excel','sheet1') success = ddepoke(channel,'R1C1','=INFO("release")') excelver = dderequest(channel,'R1C1') wait window excelver The variable 'excelver' now holds the version number of Microsoft Excel. Additional query words: FoxWin

Keywords         : Version          : Platform         : Issue type       :
 * }