19.12.2012 Views

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ISNUMERIC The value of the function IsNumeric(v) is True if v is a number, numeric variable,<br />

or a variant variable that has been assigned a number or a string that could be obtained<br />

by Formatting a number. In all other cases the value of IsNumeric is False. [variant]<br />

ITEM The value of collectionName.Item(n) is the nth object in the named collection. The<br />

value of collectionName.Item(keyString) is the nth object in the named collection, where<br />

keyString is the key given to the object when it was added to the collection. If the value of n<br />

or keyString doesn’t match an existing object of the collection, an error occurs.<br />

ITEMDATA When you create a list or combo box, <strong>Visual</strong> <strong>Basic</strong> automatically creates a long<br />

integer array referred to as ItemData. The statement List1. ItemData(m) = n assigns the value<br />

n to the mth subscripted variable of the array. It is commonly used with the NewIndex property<br />

to associate a number with each item in a list, <strong>and</strong> thereby create a minidatabase. The<br />

ItemData property is especially useful for lists in which Sorted = True.<br />

KEYPRESS The KeyPress event applies to comm<strong>and</strong> buttons, text boxes, <strong>and</strong> picture boxes.<br />

A KeyPress event occurs whenever the user presses a key while one of the preceding controls<br />

has the focus. A code identifying which key was pressed will be passed to the event procedure<br />

in the KeyAscii parameter. This information can then be used to determine what<br />

action should be taken when a given key is pressed.<br />

KILL The statement Kill “filespec”deletes the specified disk file. [filespec]<br />

LARGECHANGE When a scroll bar is clicked between the thumb <strong>and</strong> one of the arrow buttons,<br />

the Value property of the scroll bar changes by the value of the LargeChange property<br />

<strong>and</strong> the thumb moves accordingly.<br />

LBOUND For a one-dimensional array arrayName, the value of the function LBound(array-<br />

Name) is the smallest subscript value that may be used. For any array arrayName, the value<br />

of the function LBound(arrayName, n) is the smallest subscript value that may be used for<br />

the nth subscript of the array. For example, after the statement Dim example(1 To 31, 1 To<br />

12, 1990 To 1999) is executed, the value of LBound(example, 3) is the smallest value allowed<br />

for the third subscript of example( ), which is 1990.<br />

LCASE The value of the string function LCase(str) is a string identical to str except that all<br />

uppercase letters are changed to lowercase.<br />

LEFT The property Left determines the position of the left edge of a form or control. The<br />

units of measure are twips for forms. The units of measure for a control are determined by<br />

the ScaleMode property of the container (form, picture box, etc.) upon which the control has<br />

been placed, with the position of the control measured from the edge of its container using<br />

the coordinate system established by the various Scale. . . properties for the container. By<br />

default, the unit of measure for a container is twips, with a value of 0 for the Left property<br />

placing the control against the left edge of the container.<br />

LEFT The value of the function Left(str, n) is the string consisting of the leftmost n characters<br />

of str. If n is greater than the number of characters in str, the value of the function is<br />

str.<br />

LEN The value of Len(str) is the number of characters in the string str. If var is not a variable-length<br />

string variable, the value of Len(var) is the number of bytes needed to hold the<br />

value of the variable in memory. That is, Len(var) is 1, 2, 2, 4, 4, 8, or 8 for byte, Boolean,<br />

integer, long integer, single-precision, double-precision, <strong>and</strong> currency variables. Len(var),<br />

when var is a variable with a user-defined record type, is the number of bytes of memory<br />

needed to store the value of the variable. If var is a variant variable, Len(var) is the number<br />

of bytes needed to store var as a string. [variant]<br />

LET The statement Let var = expr assigns the value of the expression to the variable. If var<br />

is a fixed-length string variable with length n <strong>and</strong> Len(expr) is greater than n, then just the<br />

first n characters of expr are assigned to var. If Len(expr) < n, then expr is padded on the<br />

Appendix C 439

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!