Call VBA function from c++

201 views
Skip to first unread message

Khoo YY

unread,
Dec 27, 2013, 1:29:22 AM12/27/13
to exce...@googlegroups.com
Firstly I (naively) know ExcelDNA allows excel to call functions coded in visual studio.
However now I have two pieces of code, where I will need my vc++ to call functions from VBA... Is that even remotely possible?

Thanks!

Govert van Drimmelen

unread,
Dec 27, 2013, 5:26:53 PM12/27/13
to exce...@googlegroups.com
Hi,

Excel-DNA helps if you want to make add-ins for Excel using .NET (C# or VB.NET), but would add extra complications if you just want to use C++.

For C++, these are some popular options you might want to have a look at:

From all of these (and Excel-DNA too), you should be able to call the VBA functions using the xlUDF function in the Excel C API.
The documentation for that option is here: http://msdn.microsoft.com/en-us/library/office/bb687892.aspx

Regards,
Govert
Reply all
Reply to author
Forward
0 new messages