SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
neilson828
Topic Author
Posts: 4
Joined: January 18th, 2010, 2:32 am

EXCEL VBA declare functions packed inside DLL

May 15th, 2011, 11:49 pm

Hi,I have 10 functions (say Func1() to Func10()) written by VB6 and packed into a ActiveX DLL (ABC.dll). I'd like declare those 10 functions in EXCEL VBA and make them available on worksheet calculation. i.e. range A1 = Func1(B1, C1)I prefer early binding method. how could i declare them properly?Thanks.
 
User avatar
neilson828
Topic Author
Posts: 4
Joined: January 18th, 2010, 2:32 am

EXCEL VBA declare functions packed inside DLL

May 16th, 2011, 2:16 am

understand that I can use Declare Function Func1 Lib "xxx\ABC.dll" () As longwhat happened if Func1 is under Class1 of ABC.dll ??
 
User avatar
Cuchulainn
Posts: 59940
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

EXCEL VBA declare functions packed inside DLL

March 4th, 2013, 10:02 am

Instead of the hard-codedDeclare Function MyFunc Lib "xxx\ABC.dll" () As doubleI would like to make the location configurable. I have forgotten what the trick was :-)How?Thanks
 
User avatar
FastExcel
Posts: 50
Joined: December 2nd, 2003, 8:10 am

EXCEL VBA declare functions packed inside DLL

March 4th, 2013, 8:21 pm

Why not make your VB6 DLL an automation addin so that the functions can be called directly from worksheet formulas?Seehttp://www.cpearson.com/excel/automationaddins.aspx
 
User avatar
Cuchulainn
Posts: 59940
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

EXCEL VBA declare functions packed inside DLL

March 5th, 2013, 8:33 am

QuoteOriginally posted by: FastExcelWhy not make your VB6 DLL an automation addin so that the functions can be called directly from worksheet formulas?Seehttp://www.cpearson.com/excel/automationaddins.aspxIndeed.But the requirement is non-negotiable :-)
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On