by Anonymous (267 Submissions)
Category: String Manipulation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 7th June 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Very Simple example showing how to send arguments to a sub
'Sub that receives variables
Private Sub TestSub(hel As String, gdbye As String)
MsgBox hel + gdbye
End Sub
'Sub that sends variables
Private Sub Form_Load()
Dim strsndvar As String
Dim strsndvartwo As String
strsndvar = "hello"
strsndvartwo = " goodbye"
Call TestSub(strsndvar, strsndvartwo)
End Sub