RE: can I use the functions in VB project ?

Posted by Luca Berardi on
URL: http://quantlib.414.s1.nabble.com/can-I-use-the-functions-in-VB-project-tp3558p3559.html

Hi,

given a C function in a Xll, I use the VBA command "Application.Run"
to call that function from within the VBA.
For example consider the following code:

'Calibrate "centered" model
centeredParams = Application.Run("CapCalibrate", marketVols, _
       todaysDate, termStructureName, initialGuess, "HW", optParams, _
       capModelVolasName, paramsName, 0)

where CapCalibrate is the name of the C function contained in my Xll,
while the other inputs are the arguments that have to be passed to the
function.

However I wonder if there's a better way to work with quantlib classes
using VBA.
In the past I have been writing my code in Java and I used Java
ComBridge to interface my Java classes with Excel. It was even
possible to call the class methods from the VBA code!
Is there a way to do something similar with C++ and (of course)
QuantLib classes? Any clues?

Ciao
Luca




>-- Messaggio Originale --
>From: Adjriou Belak <[hidden email]>
>To: [hidden email]
>Subject: [Quantlib-users] can I use the functions in VB project ?
>Date: Mon, 31 Jan 2005 15:07:04 +0100 (CET)
>
>
>Hi,
>
>I integrated the quantlib functions in Excel with quantlibXL but I would
>like to use this functions
>in VB now. I am told that I can use the
>answer = WorksheetFunction. ....
>
>But the quantlibxl functions don't appear, only the default ones.
>
>regards
>thanks for your help.
>
>
>
>---------------------------------
> Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos
>mails !
>Créez votre Yahoo! Mail


__________________________________________________________________
Tiscali Adsl 2 Mega Free, 2 Mega GRATIS!
Attiva Tiscali Adsl 2 Mega Free entro il 31 gennaio e navighi GRATIS
fino al 31 marzo 2005! In piu', anche il costo di adesione e' GRATIS.
Scaricato il concetto? http://abbonati.tiscali.it/adsl/