Passing string from one private sub to another private sub

terrylau's Avatar, Join Date: Jul 2009
Go4Expert Member
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.
0
naimish's Avatar
Banned
Delcare that string Globally.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Subroutines in VB does not take params

Last edited by shabbir; 10Jul2009 at 10:34.. Reason: Typo
0
naimish's Avatar
Banned
I think he is asking in Visual Basic ( VB ) Shabbir !!
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
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
0
naimish's Avatar
Banned
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by naimish View Post
Trademarked
0
naimish's Avatar
Banned
0
terrylau's Avatar, Join Date: Jul 2009
Go4Expert Member
Yes.. I'm asking in VB6 Will making it as public sub helps?
0
naimish's Avatar
Banned
Delcare that string Globally, it will work.