Oct Function
Oct(number)
Returns a String value that represents the octal value of the argument number.
On Error Statement
On Error GoTo line
On Error Resume Next
On Error GoTo 0
Enables or disables the use of an error-handling routine. The On Error statement can specify a line label or line number (specified by the line argument) to branch to when an error occurs, allowing error-handling to be enabled. Alternatively, using On Error Resume Next causes program control to be transferred to the line of code immediately following the line of code that causes an error. Finally, On Error GoTo 0 disables all error-handling.
On...GoSub Statement
On expression GoSub destinationlist
Evaluates a given expression and, depending on its value, transfers program control to a certain subroutine. The possible subroutines are contained in the destinationlist argument, which contains one or more comma-delimited line labels or line numbers. If expression evaluates to 1, then the first subroutine in the destinationlist is used; if it evaluates to 2, then the second subroutine in the destinationlist is used; and so on. Control is transferred to the line of code immediately following the On...GoSub line when a Return statement is encountered.
On...GoTo Statement
On expression GoTo destinationlist
Evaluates a given expression and, depending on its value, transfers program control to a certain line label or line number. The possible transfer points are contained in the destinationlist argument, which contains one or more comma-delimited line labels or line numbers. If expression evaluates to 1, then the first line label in the destinationlist is used; if it evaluates to 2, then the second line label in the destinationlist is used; and so on.
Open Statement
Open pathname For mode [Access access] [lock] As _ [#]filenumber [Len=reclength]
Opens a file for input/output and assigns it to the given filenumber. The pathname argument specifies the name of the file to open, and mode indicates the file mode (Append, Binary, Input, Output, or Random). The optional Access clause can be used to specify permissions for the file (Read, Write, or Read Write). The optional lock argument can specify the operations that can be performed on the file by other processes (Shared, Lock Read, Lock Write, or Lock Read Write). The reclength argument can be used to specify the record size for random files or the buffer size for sequential files.
Option Base Statement
Option Base [0 | 1]
Declares the default lower bound of array subscripts. Option Base can only be used at module level.
Option Compare Statement
Option Compare [Binary | Text | Database]
Declares the default method used for string comparisons. Option Compare can only be used at module level.
Option Explicit Statement
Option Explicit
Forces explicit declaration of all variables in a module. If Option Explicit is not used, undeclared variables are automatically typed as Variants. Option Explicit can only be used at module level.
Option Private Statement
Option Private Module
Prevents a module's contents (that is, variables and objects) from being used outside its project. Option Private is only necessary when working with host applications that allow variables and objects to be referenced across multiple projects.
Partition Function
Partition(number, start, stop, interval)
Returns a Variant of subtype String that describes a range of numbers in which the number argument falls. The start and stop arguments specify the overall range of numbers, which is split up into smaller ranges as specified by the interval argument. The Partition function returns a string representation of the smaller range in which the number can be found, such as " 1: 10" for a number that falls in the range of 1 to 10.
Pmt Function
Pmt(rate, nper, pv[, fv[, type]])
Returns a Double value that indicates the payment for an annuity based on a number (nper) of periodic fixed payments and a fixed interest rate (rate). The pv argument specifies the present value of a series of payments or receipts. The optional fv argument specifies the future value or cash balance left after the final payment. The optional type argument specifies when payments are due (0 for end of the payment period, the default; 1 for beginning of the payment period).
PPmt Function
PPmt(rate, per, nper, pv[, fv[, type]])
Returns a Double value that indicates the principle payment for a given period (per) of an annuity based on a number (nper) of periodic fixed payments and a fixed interest rate (rate). The pv argument specifies the present value of a series of payments or receipts. The optional fv argument specifies the future value or cash balance left after the final payment. The optional type argument specifies when payments are due (0 for end of the payment period, the default; 1 for beginning of the payment period).
Print # Statement
Print #filenumber, [outputlist]
Writes data to the open sequential file that corresponds to filenumber. The optional outputlist argument can consist of one or more comma-delimited expressions to be written and should use the following syntax:
[{Spc(n) | Tab[(n)]}] [expression][charpos]
where Spc is optionally used to write n spaces, and Tab is optionally used to advance to the nth column number. The expression argument can specify the data to be written, and the charpos argument can specify the insertion point for the next character. If charpos is omitted, the next character will be written on the next line. If it is a semicolon, the next character will be written immediately following the last character.
Private Statement
Private [WithEvents] varname[([subscripts])] [As [New] type][,[WithEvents]
varname[([subscripts])] [As [New] type]]...
Declares one or more private variables. The varname argument specifies the name of the variable being declared, and subscripts are the dimensions for an array variable. The optional As [New] type clause can be used to specify the variable's data type, with the New keyword enabling implicit creation of an object. The optional WithEvents keyword specifies that the variable being declared is an object variable used to respond to events triggered by an ActiveX object. The Private statement can only be used at module level, and variables declared with it cannot be used outside their own module.
Property Get Statement
[Public | Private | Friend] [Static] Property Get name [(arglist)] [As type]
[statements]
[name = expression]
[Exit Property]
[statements]
[name = expression]
End Property
Declares the various parts of a Property Get procedure, which is used to obtain the value of a property. The optional Public, Private, and Friend keywords can be used to define the procedure's scope, and the optional Static keyword indicates that the procedure's local variables are preserved between calls to the procedure. The name argument specifies the name of the property to be retrieved and can be assigned a value (name = expression) that will be returned as the property's value. The data type of the property can be specified using the As type clause. The optional Exit Property can be used to exit the Property Get procedure immediately.
The optional list of arguments (arglist) defines the arguments that will be passed to the procedure. The arguments should use the following syntax:
[Optional] [ByVal | ByRef] [ParamArray] varname[()] [As type] [= default value]
where the Optional keyword can be used to specify that the argument is not required (default value assigns the argument's default value), ByVal and ByRef determine whether the argument should be passed by value or by reference (the default), and the ParamArray keyword specifies that the argument is an Optional array of Variant elements. ParamArray can only be used with the last argument in the argument list.
Property Let Statement
[Public | Private | Friend] [Static] Property Let name ([arglist,] value)
[statements]
[Exit Property]
[statements]
End Property
Declares the various parts of a Property Let procedure, which is used to assign a value to a property. The optional Public, Private, and Friend keywords can be used to define the procedure's scope, and the optional Static keyword indicates that the procedure's local variables are preserved between calls to the procedure. The name argument specifies the name of the property being referenced, and value indicates the value to be assigned to the property. The optional Exit Property can be used to exit the Property Let procedure immediately.
The optional list of arguments (arglist) defines the arguments that will be passed to the procedure. The arguments should use the following syntax:
[Optional] [ByVal | ByRef] [ParamArray] varname[()] [As type] [= default value]
where the Optional keyword can be used to specify that the argument is not required (default value assigns the argument's default value), ByVal and ByRef determine whether the argument should be passed by value or by reference (the default), and the ParamArray keyword specifies that the argument is an Optional array of Variant elements. ParamArray can only be used with the last argument in the argument list.
Property Set Statement
[Public | Private | Friend] [Static] Property Set name ([arglist,] reference)
[statements]
[Exit Property]
[statements]
End Property
Declares the various parts of a Property Set procedure, which is used to set a reference to an object. The optional Public, Private, and Friend keywords can be used to define the procedure's scope, and the optional Static keyword indicates that the procedure's local variables are preserved between calls to the procedure. The name argument specifies the name of the property being used, and reference indicates the object reference to be set to the property. The optional Exit Property can be used to exit the Property Set procedure immediately.
The optional list of arguments (arglist) defines the arguments that will be passed to the procedure. The arguments should use the following syntax:
[Optional] [ByVal | ByRef] [ParamArray] varname[()] [As type] [= default value]
where the Optional keyword can be used to specify that the argument is not required (default value assigns the argument's default value), ByVal and ByRef determine whether the argument should be passed by value or by reference (the default), and the ParamArray keyword specifies that the argument is an Optional array of Variant elements. ParamArray can only be used with the last argument in the argument list.
Public Statement
Public [WithEvents] varname[([subscripts])] [As [New] type][,[WithEvents]
varname[([subscripts])] [As [New] type]]...
Declares one or more public variables. The varname argument specifies the name of the variable being declared, and subscripts are the dimensions for an array variable. The optional As [New] type clause can be used to specify the variable's data type, with the New keyword enabling implicit creation of an object. The optional WithEvents keyword specifies that the variable being declared is an object variable used to respond to events triggered by an ActiveX object. The Public statement can only be used at module level, and variables declared with it can be used outside their own module.
Put Statement
Put [#]filenumber, [recnumber], varname
Writes data to the open disk file corresponding to the filenumber argument from a variable (varname). Put works with files open as Random or Binary, and a record number (recnumber) can be specified when writing data to a Random file. When using Binary files, recnumber can alternatively be used to specify the byte position at which the data is to be written.
PV Function
PV(rate, nper, pmt[, fv[, type]])
Returns a Double value that indicates the present value of an annuity based on a number (nper) of periodic fixed payments (pmt) and a fixed interest rate (rate). The optional fv argument specifies the future value or cash balance left after the final payment. The optional type argument specifies when payments are due (0 for end of the payment period, the default; 1 for beginning of the payment period).
QBColor Function
QBColor(color)
Returns a Long value that represents the RGB color code that corresponds to a given color number (0[nd]15) of the color palette used in Microsoft QuickBasic.
RaiseEvent Function
RaiseEvent eventname [(argumentlist)]
Triggers an event. The optional argumentlist specifies one or more comma-delimited arguments to be passed to the event procedure. The event procedure must be declared in the same module as the RaiseEvent function or an error will occur.
Randomize Statement
Randomize [number]
Initializes the random number generator, using the optional number argument as a seed value.
Rate Function
Rate(nper, pmt, pv[, fv[, type[, guess]]])
Returns a Double value that indicates the fixed interest rate per period for an annuity based on a number (nper) of periodic fixed payments (pmt). The optional fv argument specifies the future value or cash balance left after the final payment. The optional type argument specifies when payments are due (0 for end of the payment period, the default; 1 for beginning of the payment period). The optional guess argument specifies an estimate value to be returned by Rate (default estimate is .1).
ReDim Statement
ReDim [Preserve] varname(subscripts) [As type] [, varname(subscripts) [As type]]...
Redimensions one or more dynamic array variables and reallocates their storage space. The optional Preserve keyword can be used to keep the contents of the array intact when it is being redimensioned. The varname argument is the name of the variable, and the optional As type clause indicates its data type. The subscripts are the dimensions of the array variable.
Rem Statement
Rem comments
Allows comments to be added to a program. Everything on the line after the Rem statement is ignored by Visual Basic. An apostrophe (`) can also be used in lieu of the Rem statement.
Reset Statement
Reset
Closes all files opened with the Open statement and writes any file buffer contents to disk.
Resume Statement
Resume [0]
Resume Next
Resume line
Resumes execution of a program when an error-handling routine is finished. Resume by itself causes execution to resume with the statement that caused the error or, if the error occurred in a called procedure, the statement that last called out of the error-handling procedure. Resume Next causes execution to resume with the statement immediately following the one that caused the error. Resume line transfers control to the line label or line number specified by the line argument.
RGB Function
RGB(red, green, blue)
Returns a Long value that represents an RGB color value as specified by the red, green, and blue color components passed to the RGB function. All color components should be Integers in the 0[nd]255 range.
Right Function
Right(string, length)
Returns a String value length characters long that is taken from the right side of a given string.
RmDir Statement
RmDir path
Removes the directory or folder specified by the path argument.
Rnd Function
Rnd[(number)]
Returns a Single value that contains a randomly generated number less than 1 but greater than or equal to zero. The optional number argument can be used to determine how Rnd generates the random number.
RSet Statement
RSet stringvar = string
Assigns a string value to a String variable (stringvar), right-aligning the string to the String variable.
RTrim Function
RTrim(string)
Returns a Variant of subtype String that contains a copy of a given string with any trailing spaces removed.
No comments:
Post a Comment