HELP - Communicating between C++ and VBA

B

Benoit

Hi,

I have an Excel Spreadsheet that needs to be populated by
information coming from a C++ code. I know I could have
the C++ code create an output such as a .csv file and have
the VBA code subsequently read this file. However, the
trick is that the whole process needs to be very fast,
where are talking pretty much about live updating… The C++
code will continuously be computing and modifying the
results so unless using an intermediary such as a .csv
file can be made so that it is really fast I think it
would be better to have the VBA code directly talking with
the C++ code or something similar. So does anybody has a
clue how a VBA code doing such a thing could be achieved?

Thanks
 
A

Aaron Queenan

If you're supporting Excel XP and later, use the RTD function, which allows
a COM component to return real-time data (sort of) to Excel.

If you need to support older versions, you can use DDE (not recommended) or
COM server (using Excel as an automation server) or COM client (using VBA
code within Excel to control a COM object implemented in C++).

Regards,
Aaron Queenan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top