Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
_Application.GetThisWorkbook() in a C++ add-in
Hello comrades,
I need to get an OLE reference to the worksheet of the instance of Excel which called this add-in. I am using the following: _Application pExcelApp; Workbooks pWorkbooks; pExcelApp.CreateDispatch("Excel.Application"); pWorkbooks=pExcelApp.GetThisWorkbook(); The last line crashes "Can not get GetThisWorkbook() of this application..." _Application and Workbooks are defined in excel8.cpp and excel8.h. The pExcelApp object is instantiated, since I can do other things with it and it looks good. What am I doing wrong??? Thanks a mille!! um |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
unable to cast ..Excel.ApplicationClass to ..Excel._Application | Excel Discussion (Misc queries) | |||
1004 Method 'COMAddIns' of object '_Application' failed | Excel Programming | |||
1004 method 'COMAddIns' of object '_Application' failed | Excel Programming | |||
Method 'ActivePrinter' of object '_Application' failed | Excel Programming |