Page 393 - Excel for Scientists and Engineers: Numerical Methods
P. 393
370 EXCEL: NUMERICAL METHODS
Do ... Loop Command
Delineates a block of statements to be repeated.
Syntax: The beginning of the loop is delineated by Do or Do Until condition or Do
While condition. The end of the loop is delineated by Loop or Loop Until condition
or Loop While condition. Condition must evaluate to True or False.
Example: See examples of Do ... Loop structures in Chapter 2.
See also: Exit, For, Next, Wend, While
Double Data Type
Use to declare a variable's type as double-precision floating-point (1 5 significant
digits), either in a Dim statement, or in a Sub or Function statement. Eight bytes
required per variable.
Example: Dim tolerance As Double
See also: Dim, As, Boolean, Integer, String, Variant
Else Keyword
Optional part of If ... Then structure.
Elself Keyword
Optional part of If ... Then structure.
End Command
Terminates a procedure or block.
Syntax: End terminates a procedure. End Function is required to terminate a
Function procedure. End If is required to terminate a block If structure. End
Select is required to terminate a Select Case structure. End Sub is required to
terminate a Sub procedure. End With is required to terminate a With structure.
Example: See examples under Select Case.
See also: Exit, Function, If, Then, Else, Select Case, Sub, With
Endlf Keyword
Optional part of If ... Then structure.
Err Function
Returns a run-time error number. Use in error-handling routine to determine the
error and take appropriate corrective action.
Example: If Err.Number = 13 Then
(code for corrective action here)
Resume ptl
End If
See also: Error, On Error, Resume
Evaluate Method
Converts a name or formula to a value.
Syntax: Evaluate(expressi0n)
Expression must be a string, maximum length 255 characters. An initial equal