Page 390 - Excel for Scientists and Engineers: Numerical Methods
P. 390
APPENDIX 1 SELECTED VISUAL BASIC KEYWORDS 367
Boolean Data Type
Use to declare a variable's type as Boolean (True or False), either in a Dim
statement, or in a Sub or Function statement. Two bytes required per variable.
When number values are converted to Boolean values, 0 becomes False and all
other values become True. When Boolean values are converted to numbers, False
becomes 0 and True becomes -1.
See also: Dim, As, Double, Integer, String, Variant
Call Command
Transfers control to a Sub procedure.
Syntax: Call name (argumentl, ...)
Name is the name of the procedure. Argumentl, etc., are the names assigned to the
arguments passed to the procedure. Call is optional; if omitted, the parentheses
around the argument list must also be omitted.
Example: Call Task1 (argumentl ,argument2)
See also: Sub, Function
Case Keyword
See: Select Case
Cells Method
Returns a single cell by specifying the row and column.
Syntax: object.Cells(row, column)
Object is optional; if not specified, Cells refers to the active sheet.
Example: Cells(2,1).Value = 5 enters the value 5 in cell A2.
See also: Range
Characters Object
Represents characters in any object containing text. Use the Characters object to
format characters within a text string.
Syntax: expression. C haracters (start, length)
Example: Selection.Characters(Start:=x, Length:=l).Font.Subscript = True
Clear Method
Clears formulas and formatting from a range of cells.
Syntax: object.Clear
Object can be Range (or ChartArea).
Example: Range("A1 :ClO").Clear
See also: ClearContents, ClearFormats in Excel's On-Line Help.
Close Method
Closes a window, workbook or workbooks.
Syntax: For workbooks, use object.Close. For a workbook or window, use
object. C I ose( Save ChangesLogical, File Name).
Object can be Window, Workbook or Workbooks. If SaveChangesLogical is False,