CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 1999
    Posts
    492

    Return Parameters in VB

    If I want to pass variables into a Visual Basic function and have them updated (passed by reference in C++) how do I do this?

    For example:


    Dim strMonth
    Dim obj
    :
    :
    ' Before the function is called strMonth is ""
    obj.GetMonth(strMonth)
    ' Now the value of strMonth is "October"
    :
    :




    what is the format for this syntax? Is it compatible with VBScript? Sorry for the simple question, I can't find the information in the MSDN.

    Thanks

    Why are the "tolerant" so easy to offend?

  2. #2
    Join Date
    Aug 1999
    Posts
    492

    Re: Return Parameters in VB

    Never mind. There is no additional formatting, it's exactly as I posted! I didn't want to try running the component because I thought it might screw itself up on the server, but it actually worked!

    Never mind!

    Why are the "tolerant" so easy to offend?

  3. #3
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868

    Re: Return Parameters in VB

    You can pass variables either byVal or byRef... as you discovered byRef is the default if not specified.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured