View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Programming Function

Tell us what the error is.

Rick


"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