How can C++ code be accessed elsewhere?

I have a C++ function that I like. How can I access it from, say, Excel VBA?

I've heard "COM" as an answer in Google searches, but not how to make code for COM. If it is the way to go, how do I use it? (Platform is Windows 7.)

PS- Excel 2010 has a button for "COM Add-Ins" under the Developer tab.
Last edited on
Make a dll?
A DLL works for calling functions in other C++ programs, right?

From the bit of reading I did goolging around, though, I got the strong impression that COM or something would be needed to interface between C++ DLL's and other platforms, such as the VBA hosted by Excel.

This said, I'm really quite clueless since I've never done this sort of thing before. It's just that I keep hearing that it's not that simple.
Topic archived. No new replies allowed.