Calling Microsoft Excel Macro from FoxPro for MacintoshLast reviewed: May 21, 1996Article ID: Q118779 |
The information in this article applies to:
SUMMARYWhen you are developing an application in FoxPro for Macintosh, you may sometimes need to tap into the functionality of another application. This article demonstrates how to execute a macro written in Microsoft Excel version 4.0 for Macintosh and return a result.
MORE INFORMATIONTo run a Microsoft Excel macro, three components are necessary: the Microsoft Excel macro, the AppleScript script, and the FoxPro Command window. To create a simple Microsoft Excel macro that fills in the first 50 cells of the first column of a worksheet, do the following:
RUNSCRIPT RunXLMacro TO ret WAIT WINDOW retThe macro is executed synchronously. This means that control is not returned to the user until after the macro has completed execution. If the FoxPro desktop and Command windows are not maximized, you should see the macro execute in the background, filling in the first fifty cells of a new worksheet with the numbers 1 through 50. If you can't see the macro executing, switch to Microsoft Excel once control returns to FoxPro and look at the new worksheet.
REFERENCESMicrosoft Excel "Function Reference"
|
Additional reference words: vFoxMac 3.00b FoxMac 2.50b 2.50c Ascript Apple
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |