Mega Code Archive

 
Categories / VisualBasic Script / Language Basics
 

Illustrate a reason why you might want to pass a parameter by reference

Sub GoodPassByRef()     Dim blnSuccess As Boolean     Dim strName As String     strName = "rntsoft.com"     blnSuccess = GoodFunc(strName)     Debug.Print blnSuccess End Sub Function GoodFunc(strName As String)     If Len(strName) Then         strName = UCase$(strName)         GoodFunc = True     Else         GoodFunc = False     End If End Function