View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
isabelle isabelle is offline
external usenet poster
 
Posts: 587
Default Return a string by reference?

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 :
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