Monday, March 26, 2012

Pass value to function

Hello,
I have this function:
Sub Add_Menu_Item(ByVal Id As String, ByVal Text() As String)
And I am calling it this way:
Add_Menu_Item("home", {"contact","contacts"})
I get this error:
Compiler Error Message: BC30201: Expression expected.
Why?
Thanks,
Miguel
You have to use it like this:
Add_Menu_Item("home", new string() {"contact","contacts"})

0 comments:

Post a Comment