Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Passing string from one private sub to another private sub (http://www.go4expert.com/forums/passing-string-private-sub-private-sub-t18454/)

terrylau 10Jul2009 09:42

Passing string from one private sub to another private sub
 
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.

naimish 10Jul2009 09:59

Re: Passing string from one private sub to another private sub
 
Delcare that string Globally.

shabbir 10Jul2009 10:15

Re: Passing string from one private sub to another private sub
 
Subroutines in VB does not take params

naimish 10Jul2009 10:18

Re: Passing string from one private sub to another private sub
 
I think he is asking in Visual Basic ( VB ) Shabbir !!

shabbir 10Jul2009 10:34

Re: Passing string from one private sub to another private sub
 
Quote:

Originally Posted by naimish (Post 52050)
I think he is asking in Visual Basic ( VB ) Shabbir !!

Sorry that was a typo. PHP does not have subroutines

naimish 10Jul2009 10:37

Re: Passing string from one private sub to another private sub
 
:(

shabbir 10Jul2009 10:47

Re: Passing string from one private sub to another private sub
 
Quote:

Originally Posted by naimish (Post 52057)
:(

Trademarked :D

naimish 10Jul2009 11:00

Re: Passing string from one private sub to another private sub
 
:lol:

terrylau 10Jul2009 11:22

Re: Passing string from one private sub to another private sub
 
Yes.. I'm asking in VB6 :shy: Will making it as public sub helps?

naimish 10Jul2009 11:23

Re: Passing string from one private sub to another private sub
 
Delcare that string Globally, it will work.


All times are GMT +5.5. The time now is 22:09.