Click to See Complete Forum and Search --> : Return Parameters in VB


SteveS
October 3rd, 2001, 05:20 PM
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

SteveS
October 3rd, 2001, 05:21 PM
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!

DSJ
October 4th, 2001, 08:21 AM
You can pass variables either byVal or byRef... as you discovered byRef is the default if not specified.