1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Passing string from one private sub to another private sub

Discussion in 'Visual Basic ( VB )' started by terrylau, Jul 10, 2009.

  1. terrylau

    terrylau New 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.
     
  2. naimish

    naimish New Member

    Delcare that string Globally.
     
  3. shabbir

    shabbir Administrator Staff Member

    Subroutines in VB does not take params
     
    Last edited: Jul 10, 2009
  4. naimish

    naimish New Member

    I think he is asking in Visual Basic ( VB ) Shabbir !!
     
  5. shabbir

    shabbir Administrator Staff Member

    Sorry that was a typo. PHP does not have subroutines
     
  6. naimish

    naimish New Member

  7. shabbir

    shabbir Administrator Staff Member

    Trademarked :D
     
  8. naimish

    naimish New Member

    :lol:
     
  9. terrylau

    terrylau New Member

    Yes.. I'm asking in VB6 :shy: Will making it as public sub helps?
     
  10. naimish

    naimish New Member

    Delcare that string Globally, it will work.
     

Share This Page