View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
Zone[_3_] Zone[_3_] is offline
external usenet poster
 
Posts: 373
Default Programming Function

Matt, I think it's a case of "you can't get there from here, you'll have to
go somewhere else and start from there!", meaning you'll have to build the
entire formula in a different way (maybe using a userform?) and insert the
entire formula in the cell, to get it to work properly. Seems to me if the
outer function (BDP) is looking for literal string arguments, it's not going
to be happy with UDF-created arguments unless the entire formula is created
elsewhere and inserted in the cell. Of course, I could be wrong. Maybe
Rick has more ideas. James
"Matt McMaster" wrote in message
...
Sorry, still returns an error.

As an alternative, is there anyway to use the reference supplied by the
user. So instead of getting the value AUD, I get B2 and then I could use
that?

Matt

"Rick Rothstein (MVP - VB)" wrote:

Function Futures (BBCODE, BBKEY)

FULLBBCODE = BBCODE & " " & BBKEY
Futures = [BDP(FULLBBCODE, "Last Price")]

End Function

where BBCODE equals cell B2 = AUD
and BBKEY equals cell B3 = Curncy


What about this?

Function Futures (BBCODE, BBKEY)
FULLBBCODE = BBCODE & " " & BBKEY
Futures = ["BDP(""" & FULLBBCODE & """,""LAST_PRICE"")"]
End Function

Rick