Call to macro in OLE object not found 
Author Message
 Call to macro in OLE object not found

I have a VFP 5.0 app which creates an Excel application object then
opens a workbook and calls various macros stored in the workbook. ( I am
using Excel v. 7.0a)

On the first macro that VFP calls I frequently get an OLE error saying
the macro can't be found.  This only happens *some* of the time.
Several other macros (also stored in the same workbook - all have
parameters passed from VFP) are called from within VFP using the same
type of object referencing with no problem.  For some reason it is only
the one macro and only some of the time.  Does anyone have any idea why
this would be so?

Not sure if this is helpful but here is VFP code that calls it...

    oWkBook = GETOBJECT("C:\MyPath\MyWorkbook.xls")
    oWkBook.application.visible=.T.
    oWkBook.application.workbooks("MyWorkbook.xls").Activate
    oWkBook.application.run("MyWorkbook!MyMacro", cParaRef)

In addition, to get this one to *ever* work I had to reference it as
Workbook!Macro.  All the others can be called just fine with only
    oWkBook.application.run("MyMacro", parameters)

TIA for your help.
Rose Eby



Sun, 27 Aug 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Object not found with Object.Enable = .T.

2. When is a Macro not a Macro in VFP3.0a

3. OLE Error: Coinitialize has not been called

4. OLE Error: Application not found

5. OLE error code 0x80040112: Appropriate license for this class not found

6. OLE error code 0x80040112:Appropriate license not found

7. can not find ole server

8. "OLE error code 0x80040112:Appropriate license for this class not found

9. OLE error code 0x8002802b: Element not found

10. HELP : OLE error code 0x90040112: Appropiate license for this class not found

11. Error 1426 - OLE error: Appropriate license for this class not found

12. OLE error code 0x80020003: Member not found

 

 
Powered by phpBB® Forum Software