Difference between procedures and functions in vb script
Major difference between procedures and functions in vb script is that procedures can not return the value but functions can return the value.
Procedure Example -
Procedure Example -
Sub findsq() temp = InputBox("Please enter the number", 1) MsgBox "square root of the num is " & sqrt(temp) End Sub 'Function Example a = findsq() ' function returns the value in variable a msgbox a function findsq() temp = InputBox("Please enter the number", 1) findsq = sqrt(temp) End function
0 comments:
Post a Comment