Microsoft KB Archive/98701

{|
 * width="100%"|

-

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5, 2.5a

-

SUMMARY
Microsoft FoxPro for Windows can load and run a Microsoft Excel 4.0 macro from a general field. The information below provides the steps for using the Auto_Activate Microsoft Excel macro.

NOTE: These steps do not work with Excel versions greater than 4.0.

MORE INFORMATION
The Auto_Activate macro executes when a Microsoft Excel macro sheet is activated.

To create this macro, do the following:

 Create a database in FoxPro with a general field. Open the general field in FoxPro, and choose Insert Object from the Edit menu. From the Insert Object list, choose Microsoft Excel Macrosheet. (Microsoft Excel must be a registered server application in order for this option to be available.)  In cell A1, type the following:        =ALERT(&quot;This is the Auto_Activate&quot;)   In cell A2, type the following:        =RETURN  Select cell A1. From the Formula menu, choose Define Name. In the Name box, type &quot;Auto_Activate&quot; (without the quotation marks).</li> In the Macro section of the Define Name dialog box, select Command.</li> In the Refers To box, type &quot;=$A$1&quot; (without the quotation marks).</li> In the Category box, make sure User Defined is selected.</li> Choose Add and then choose OK.</li> From the File menu, choose Exit, and choose Yes to update the macro sheet.</li></ol>

When selected, this general field will now start Microsoft Excel and run the Auto_Activate macro. Additional query words: FoxWin 2.50 Excel OLE DDE macrosheet

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