Passing string from one private sub to another private sub

Go4Expert Member
10Jul2009,09:42   #1
terrylau's Avatar
Hi, need suggestion or help to pass string from one private sub to another private sub. For example :

Private Sub 1
stringB = stringA

Private Sub 2
stringA

How do I pass the stringA to stringB?
Have been reading around but not so sure about some of the comments on using ByVal, byRef or even using Public Sub and Module.

Appreciate any input into this. Thanks in advance.
Banned
10Jul2009,09:59   #2
naimish's Avatar
Delcare that string Globally.
Go4Expert Founder
10Jul2009,10:15   #3
shabbir's Avatar
Subroutines in VB does not take params

Last edited by shabbir; 10Jul2009 at 10:34.. Reason: Typo
Banned
10Jul2009,10:18   #4
naimish's Avatar
I think he is asking in Visual Basic ( VB ) Shabbir !!
Go4Expert Founder
10Jul2009,10:34   #5
shabbir's Avatar
Quote:
Originally Posted by naimish View Post
I think he is asking in Visual Basic ( VB ) Shabbir !!
Sorry that was a typo. PHP does not have subroutines
Banned
10Jul2009,10:37   #6
naimish's Avatar
Go4Expert Founder
10Jul2009,10:47   #7
shabbir's Avatar
Quote:
Originally Posted by naimish View Post
Trademarked
Banned
10Jul2009,11:00   #8
naimish's Avatar
Go4Expert Member
10Jul2009,11:22   #9
terrylau's Avatar
Yes.. I'm asking in VB6 Will making it as public sub helps?
Banned
10Jul2009,11:23   #10
naimish's Avatar
Delcare that string Globally, it will work.