Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Return a string by reference?

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert cells reference to string reference?? Robert Crandal Excel Programming 2 December 1st 09 07:46 AM
EXCEL: find string in vector & return cell reference Audit Compliance Man[_2_] Excel Worksheet Functions 1 May 8th 09 02:15 PM
return partial string alex Excel Worksheet Functions 5 July 20th 07 11:41 AM
check if reference exists, then return its value or return 0 doudou Excel Worksheet Functions 1 June 4th 05 09:17 PM
SQL string to return top row Quartz Excel Programming 1 December 30th 03 07:43 PM


All times are GMT +1. The time now is 02:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"