ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Errors with #import "Excel9.olb" (https://www.excelbanter.com/excel-programming/285156-errors-import-excel9-olb.html)

Julia[_2_]

Errors with #import "Excel9.olb"
 
Hi

I have a standard VC++ Win32 DLL that exports some functions. I am
trying to utilize some of the functionality in Excel and as far as I
can tell the easiest way to do that is to #import "Excel9.olb". The
problem is that when I include this line of code I get loads of build
errors like "error C2504: '_IMsoDispObj' : base class undefined".

Does anyone know why I'm getting these errors – am I neglecting to do
something? Or, is there a better way to automate Excel other than
#import, and if so, what?

Many thanks
Julia.

Bill Manville

Errors with #import "Excel9.olb"
 
Julia wrote:
I have a standard VC++ Win32 DLL that exports some functions.


I may be wrong, but I don't think we have many experts in C++ in this
newsgroup which focuses on the use of VBA within Excel.

You might be better trying a group such as
microsoft.public.vc.language

The OLB file provides a set of object class definitions for Excel.
In the VB world we would Reference the file rather than Import it - but
I don't know how that translates into C++

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup



All times are GMT +1. The time now is 12:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com