sub
A Sub procedure is a series of VBScript statements, enclosed by the Sub and End Sub statements, that performs actions but doesn't return a value. A Sub procedure can take arguments (constants, variables, or expressions that are passed by a calling procedure). If a Sub procedure has no arguments, its Sub statement must include an empty set of parentheses. The following Sub procedure uses two intrinsic, or built-in, VBScript functions, MsgBox and InputBox, to prompt a user for some information. It then displays the results of a calculation based on that information. The calculation is performed in a Function
procedure created using VBScript. The Function procedure is shown in the following discussion.
Sub ConvertTemp()
temp = InputBox("Please enter the
temperature in degrees F.", 1)
MsgBox "The temperature is " &
Celsius(temp) & " degrees C."
End Sub
No comments:
Post a Comment