Answers for "vb.net forms create sub that can be used anywhere"

1

subroutine vb.net

'Function syntax
Private Sub [functionName](ByVal [variableName] As [DataType])
  [Code to run when function is called]
End Sub

'example subroutine
Private Sub add(ByVal a As Integer, ByVal b As Integer)
	Dim result As Integer
	result = a + b
	MsgBox("The sum of the two numbers is " & result)
End Sub

'NOTE: If the keyword “return” is in the code, then it’s a function. 
'If not, it’s a subroutine.
Posted by: Guest on September-04-2020

Code answers related to "vb.net forms create sub that can be used anywhere"

Browse Popular Code Answers by Language