Serving the Quantitative Finance Community

 
User avatar
liefje
Topic Author
Posts: 0
Joined: September 26th, 2002, 2:11 pm

range and xll vba

May 7th, 2004, 7:59 am

Hi allI am trying to use an xll function in vba.This xll function when used in the Excel worksheet takes a range as an argument : ex =define_yc($A$1:$B25)However when I try to use this xll in vba with executeexcel4macro, I don't suceed to pass the range as an argument.So I transform the array as a string res="define_yc({,;,;,;; .......})" but then if len(res)>255 I got a message error.What would be the best way to address this?thks
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

range and xll vba

May 7th, 2004, 4:26 pm

I dont think there is a straightforward solution to your problem. The thing is the XLL is expecting an argument which could either be an XLOPER or FP* (see Excel SDK for definitions). You could try playing with a Range object in vb ... trying to simulate a call from an excel cell.
knowledge comes, wisdom lingers