I have the following two procedures:
Sub OuterSub()
Dim s As String
s = \"Lorem ipsum dolor sit amet\"
InnerSub s
End Sub
Sub InnerSub(prm As Va
I don't know the reason, but it appears that when passing byref the expection is throw. String is passed by reference, but if you put a parenthesis around it, it is passed by value:
Sub OuterSub()
Dim s As String
s = "Lorem ipsum dolor sit amet"
InnerSub (s)
End Sub
Another option, if you don't want to change the outer function, is to define the InnerSub prm
by value:
Sub InnerSub(ByVal prm As Variant)
prm = Array(prm)
End Sub