Return a string by reference?

R

Robert Crandal

Is it possible to return a string "by reference" through a string
parameter?

Here's what I'm trying to do:
--------------------------------------------------------------------

Sub GiveBackString (ByRef targ as String)

targ = "Hello" ' This string is returned through 'targ' variable???

End
 
I

isabelle

hi Robert,

Public Const MyString = "Hello"

Sub test()
GiveBackString MyString
End Sub

Sub GiveBackString(ByRef targ As String)
MsgBox targ
End Sub

isabelle

Le 2013-02-02 03:51, Robert Crandal a écrit :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top