Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling VFP from Excel
Message
 
To
03/06/2001 22:21:58
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00514397
Message ID:
00514479
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
Anthony,

Run-time error 107: From the MSDN library indicates a "Operator/operand type mismatch". Somewhere in your VFP dll you have conflicting variable types.

Debugging a dll is not an easy task. There are several ways to ascertain the cause of your error.

1. Have you tried running the DLL from the FoxPro Command Window with the class library or the DLL.
2. Test to ensure the parameters being passed are what you expect them to be. Try using the Type() function to evaluate the parameter. If it not what you excpect return a message back to excel.
3. Use the ComReturnError() function. Search for the function on MSDN.

What type of Object are you trying to pass to Fox?



>I'm trying to write a macro in Excel which will run a DLL written in VFP.
>
>So far, I can instanciate a VFP object and run the VFP method from within the Excel macro, but I'm running into problems and have the following questions :
>
>1) When ever I try to pass parameters or return a value from the VFP method, I received a Run-time error '107'.
>
>2) Is there a way in Excel to run a macro directly from a cell on the spreadsheet such that it returns a value directly into the cell?
>
>3) Is there a way within an Excel macro to pass an object reference of the active Excel worksheet to the VFP DLL?
>
>Any help would be greatly appreciated.
>
>Anthony Letts
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform