Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

https://stackoverflow.com/questions/55585923/set-vba-variable-to-result-from-function-which-is-string

No Format
Public SubFunction MainSubTestTest(var As String) As String
 returnstr  = foo("bar")
   MsgBox returnstr Test = var & " World"
End SubFunction

PublicSub Function Test(ByRef var As Stringtesting()
As String   returnstr Test = Test("fooHello")
& var   MsgBox returnstr
End FunctionSub