Interface IStdInformationModule
MS-VBAL 6.1.2.7 Information Module
[StdLibModule(null)]
public interface IStdInformationModule
Remarks
Formalizes the public interface of the standard library VBA.Information module.
Methods
Erl()
Gets the line number the most recent run-time error was raised at — the nearest
line-number label at or before the faulting statement, or 0 when none precedes it.
RuntimeSemanticsEvaluationResult<VBLongValue> Erl()
Returns
- RuntimeSemanticsEvaluationResult<VBLongValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
👉 Not a member MS-VBAL documents at all, and hidden in MS-VBA, which nonetheless exposes it from this module. A line number is sticky: it labels every statement after it until the next one, so this answers for a statement that carries no label of its own. A named label never sets it.
🎯 RD-VBA returns a Long where MS-VBA returns ushort resolution. A
deliberate divergence: MS-VBA wraps Erl around on any line number that does not fit, so a
program numbered past 65535 is told it faulted at a line it has not got. Widening it costs nothing
and makes every legal line number label representable.
Err()
MS-VBAL 6.1.3.2 Err Class Gets the error object: the single
ErrObject instance reflecting the error state of the active VBA environment.
[StdLibMember(null, ReturnType = typeof(IStdErrClass))]
RuntimeSemanticsEvaluationResult<VBObjectValue> Err()
Returns
- RuntimeSemanticsEvaluationResult<VBObjectValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
👉 Not a member MS-VBAL lists under this module: §6.1.3.2 describes the error
object as the default instance of a global class module named Err, while MS-VBA exposes it
as this zero-argument function of Information, returning an instance of a class named
ErrObject. The two are the same thing seen from source — a bare Err yields the error
object either way, because a standard module's members are promoted to the project scope — and
this is the arrangement that also makes ErrObject nameable in an As clause.
IMEStatus()
MS-VBAL 6.1.2.7.1.1 IMEStatus
[StdLibMember(null, ReturnType = typeof(VBIMEStatus))]
RuntimeSemanticsEvaluationResult<VBLongValue> IMEStatus()
Returns
- RuntimeSemanticsEvaluationResult<VBLongValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Returns a VBIMEStatus value representing the current implementation-dependant Input Method Editor (IME) mode.
IsArray(VBVariantValue)
MS-VBAL 6.1.2.7.1.2 IsArray
RuntimeSemanticsEvaluationResult<VBBooleanValue> IsArray(VBVariantValue arg)
Parameters
argVBVariantValueThe data value to be tested
Returns
- RuntimeSemanticsEvaluationResult<VBBooleanValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Tests a provided value to check if it is a VBArrayValue.
IsDate(VBVariantValue)
MS-VBAL 6.1.2.7.1.3 IsDate
RuntimeSemanticsEvaluationResult<VBBooleanValue> IsDate(VBVariantValue arg)
Parameters
argVBVariantValueThe data value to be tested
Returns
- RuntimeSemanticsEvaluationResult<VBBooleanValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Tests a provided value to check if it is a VBDateValue.
IsEmpty(VBVariantValue)
MS-VBAL 6.1.2.7.1.4 IsEmpty
RuntimeSemanticsEvaluationResult<VBBooleanValue> IsEmpty(VBVariantValue arg)
Parameters
argVBVariantValueThe data value to be tested
Returns
- RuntimeSemanticsEvaluationResult<VBBooleanValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Tests a provided value to check if it is a VBEmptyValue.
IsError(VBVariantValue)
MS-VBAL 6.1.2.7.1.5 IsError
RuntimeSemanticsEvaluationResult<VBBooleanValue> IsError(VBVariantValue arg)
Parameters
argVBVariantValueThe data value to be tested
Returns
- RuntimeSemanticsEvaluationResult<VBBooleanValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Tests a provided value to check if it is a VBErrorValue.
IsMissing(VBVariantValue)
MS-VBAL 6.1.2.7.1.6 IsMissing
RuntimeSemanticsEvaluationResult<VBBooleanValue> IsMissing(VBVariantValue arg)
Parameters
argVBVariantValueThe data value to be tested
Returns
- RuntimeSemanticsEvaluationResult<VBBooleanValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Tests a provided value to check if it is a VBMissingValue.
👉 The value can only be a VBMissingValue if it is the VBVariantValue of an optional parameter that was not supplied.
IsNull(VBVariantValue)
MS-VBAL 6.1.2.7.1.7 IsNull
RuntimeSemanticsEvaluationResult<VBBooleanValue> IsNull(VBVariantValue arg)
Parameters
argVBVariantValueThe data value to be tested
Returns
- RuntimeSemanticsEvaluationResult<VBBooleanValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Tests a provided value to check if it is a VBNullValue.
IsNumeric(VBVariantValue)
MS-VBAL 6.1.2.7.1.8 IsNumeric
RuntimeSemanticsEvaluationResult<VBBooleanValue> IsNumeric(VBVariantValue arg)
Parameters
argVBVariantValueThe data value to be tested
Returns
- RuntimeSemanticsEvaluationResult<VBBooleanValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Tests a provided value to check if it is a VBNumericTypedValue.
IsObject(VBVariantValue)
MS-VBAL 6.1.2.7.1.9 IsObject
RuntimeSemanticsEvaluationResult<VBBooleanValue> IsObject(VBVariantValue arg)
Parameters
argVBVariantValueThe data value to be tested
Returns
- RuntimeSemanticsEvaluationResult<VBBooleanValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Tests a provided value to check if it is a VBObjectValue.
QBColor(VBIntegerValue)
MS-VBAL 6.1.2.7.1.10 QBColor
RuntimeSemanticsEvaluationResult<VBLongValue> QBColor(VBIntegerValue color)
Parameters
colorVBIntegerValueA value in the 0-15 range naming one of the legacy 16-bit colors.
Returns
- RuntimeSemanticsEvaluationResult<VBLongValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the RGB color value for a specified color value used by earlier versions of Visual Basic.
RGB(VBIntegerValue, VBIntegerValue, VBIntegerValue)
MS-VBAL 6.1.2.7.1.11 RGB
RuntimeSemanticsEvaluationResult<VBLongValue> RGB(VBIntegerValue red, VBIntegerValue green, VBIntegerValue blue)
Parameters
redVBIntegerValueA value in the VBByteValue range (0-255) representing the red component of the color.
greenVBIntegerValueA value in the VBByteValue range (0-255) representing the green component of the color.
blueVBIntegerValueA value in the VBByteValue range (0-255) representing the blue component of the color.
Returns
- RuntimeSemanticsEvaluationResult<VBLongValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets a VBLongValue representing a RGB color value from its specified parts.
TypeName(VBVariantValue)
MS-VBAL 6.1.2.7.1.12 TypeName
RuntimeSemanticsEvaluationResult<VBStringValue> TypeName(VBVariantValue arg)
Parameters
argVBVariantValueThe data value to name the type of.
Returns
- RuntimeSemanticsEvaluationResult<VBStringValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the name of the data type of the specified value.
👉 If the provided value is a VBArrayValue, the returned string contains the item data type of the array appended with a pair of empty parentheses, e.g. "Byte()" for an array of VBByteValue items.
VarType(VBVariantValue)
MS-VBAL 6.1.2.7.1.13 VarType
[StdLibMember(null, ReturnType = typeof(VBVarType))]
RuntimeSemanticsEvaluationResult<VBLongValue> VarType(VBVariantValue varName)
Parameters
varNameVBVariantValueThe data value to report the subtype of.
Returns
- RuntimeSemanticsEvaluationResult<VBLongValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the subtype of the specified VBVariantValue.
👉 An array's subtype is VBArray combined with the item data type of the array, e.g. 8209 for an array of VBByteValue items.