Interface IStdInteractionModule
MS-VBAL 6.1.2.8 Interaction Module
public interface IStdInteractionModule
Remarks
Formalizes the public interface of the standard library VBA.Interaction module.
ℹ️ This interface is currently incomplete.
Methods
StdInteraction__CallByName(VBRuntimeReference, string, VBCallType, params VBRuntimeVariantValue[])
MS-VBAL 6.1.2.8.1.1 CallByName
RuntimeSemanticsEvaluationResult StdInteraction__CallByName(VBRuntimeReference objectValue, string procName, VBCallType callType, params VBRuntimeVariantValue[] args)
Parameters
objectValueVBRuntimeReferenceThe object exposing the member to be invoked.
procNamestringThe name of the member to be invoked.
callTypeVBCallTypeThe type of member invocation.
argsVBRuntimeVariantValue[]Any arguments to be supplied to the member upon invocation.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Invokes a method or property by name against the specified VBObjectValue.
StdInteraction__Choose(VBRuntimeValue<float>, params VBRuntimeVariantValue[])
MS-VBAL 6.1.2.8.1.2 Choose
RuntimeSemanticsEvaluationResult StdInteraction__Choose(VBRuntimeValue<float> index, params VBRuntimeVariantValue[] choice)
Parameters
indexVBRuntimeValue<float>An VBIntegerValue between 1 and the number of supplied choices.
choiceVBRuntimeVariantValue[]An array containing the values to choose from.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Invokes a method or property by name against the specified VBObjectValue.
👉 Indexing is one-based regardless of any Option Base directives.
⚠️ This function yields a VBNullValue if the supplied index is out of bounds.
StdInteraction__CreateObject(VBRuntimeReference, VBRuntimeReference?)
MS-VBAL 6.1.2.8.1.4 CreateObject
RuntimeSemanticsEvaluationResult StdInteraction__CreateObject(VBRuntimeReference objectClass, VBRuntimeReference? serverName = null)
Parameters
objectClassVBRuntimeReferenceA VBStringValue containing the application name and class of the object to create.
serverNameVBRuntimeReference?A VBStringValue containing the name of the network server where the object will be created.
Optional: the local machine is used unless specified otherwise.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Creates and returns an object reference to an externally provided and possibly remote object.
StdInteraction__DoEvents()
MS-VBAL 6.1.2.8.1.5 DoEvents
RuntimeSemanticsEvaluationResult StdInteraction__DoEvents()
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Yields execution so the operating system can process externally generated events.
👉 This function returns an VBIntegerValue with an implementation-defined meaning.
StdInteraction__GetAllSettings(VBRuntimeReference, VBRuntimeReference)
MS-VBAL 6.1.2.8.1.7 GetAllSettings
RuntimeSemanticsEvaluationResult StdInteraction__GetAllSettings(VBRuntimeReference appName, VBRuntimeReference section)
Parameters
appNameVBRuntimeReferenceA VBStringValue expression containing the name of the application or project whose key settings are requested.
sectionVBRuntimeReferenceA VBStringValue expression containing the name of the configuration section whose key settings are requested.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets a two-dimensional VBArrayValue containing VBStringValue elements representing the configuration setting keys and values of the specified settings store section if it exists under the specified application name; returns VBEmptyValue otherwise.
StdInteraction__GetAttr(VBRuntimeReference)
MS-VBAL 6.1.2.8.1.8 GetAttr
RuntimeSemanticsEvaluationResult StdInteraction__GetAttr(VBRuntimeReference pathName)
Parameters
pathNameVBRuntimeReferenceA VBStringValue expression containing a file name. May specify a mapped drive and/or a directory/folder path.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets the VBFileAttribute bitwise flags representing the attributes of a specified file or directory/folder.
StdInteraction__GetJsonSetting(VBRuntimeReference, VBRuntimeReference?, VBRuntimeVariantValue?)
🧩 RD-VBAL 6.1.2.8.1.10.1 GetJsonSetting
RuntimeSemanticsEvaluationResult StdInteraction__GetJsonSetting(VBRuntimeReference key, VBRuntimeReference? config = null, VBRuntimeVariantValue? defaultValue = null)
Parameters
keyVBRuntimeReferenceA VBStringValue expression containing the managed configuration path (e.g.
"Configuration:ConnectionStrings:AppDb") of the configuration section whose key settings are requested.configVBRuntimeReference?A VBStringValue expression containing the name of a .json configuration file associated with the workspace application.
Optional: The default value of this parameter depends on the current host configuration (normally"appsettings.json").defaultValueVBRuntimeVariantValue?A VBVariantValue expression containing the value to return if no value is set in the key setting.
Optional: defaults to ZeroLengthString.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets a VBStringValue representing the value of the specified managed configuration setting if it exists; gets the specified defaultValue otherwise.
StdInteraction__GetJsonSettings(VBRuntimeReference, VBRuntimeReference?)
🧩 RD-VBAL 6.1.2.8.1.7.1 GetJsonSettings
RuntimeSemanticsEvaluationResult StdInteraction__GetJsonSettings(VBRuntimeReference key, VBRuntimeReference? config = null)
Parameters
keyVBRuntimeReferenceA VBStringValue expression containing the managed configuration path (e.g.
"Configuration:ConnectionStrings") of the configuration section whose key settings are requested.configVBRuntimeReference?A VBStringValue expression containing the name of a .json configuration file associated with the workspace application.
Optional: The default value of this parameter depends on the current host configuration (normally"appsettings.json").
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets a two-dimensional VBArrayValue containing VBStringValue elements representing the configuration setting keys and values of the specified managed configuration section if it exists; returns VBEmptyValue otherwise.
StdInteraction__GetObject(VBRuntimeVariantValue?, VBRuntimeVariantValue?)
MS-VBAL 6.1.2.8.1.9 GetObject
RuntimeSemanticsEvaluationResult StdInteraction__GetObject(VBRuntimeVariantValue? pathName = null, VBRuntimeVariantValue? className = null)
Parameters
pathNameVBRuntimeVariantValue?A VBStringValue expression containing the name of the network server where the object will be created.
Optional: the local machine is used unless specified otherwise.classNameVBRuntimeVariantValue?A qualified VBStringValue expression containing the application name and class of the object to create.
Optional (⚠️ but raises an error given VBMissingValue): returns the singleton instance of (the last created) single-instance object given an empty string.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets (or creates if none is found) a VBObjectValue reference to an externally provided and possibly remote object.
👉 This function cannot be used to get a reference to an object of a workspace-defined object class.
🎯 TODO: Clarify the specification of the behavior of an omitted className parameter.
StdInteraction__GetSetting(VBRuntimeReference, VBRuntimeReference, VBRuntimeReference, VBRuntimeVariantValue?)
MS-VBAL 6.1.2.8.1.10 GetSetting
RuntimeSemanticsEvaluationResult StdInteraction__GetSetting(VBRuntimeReference appName, VBRuntimeReference section, VBRuntimeReference key, VBRuntimeVariantValue? defaultValue = null)
Parameters
appNameVBRuntimeReferenceA VBStringValue expression containing the name of the application or project whose key settings are requested.
sectionVBRuntimeReferenceA VBStringValue expression containing the name of the configuration section whose key settings are requested.
keyVBRuntimeReferenceA VBStringValue expression containing the key of the requested key setting value.
defaultValueVBRuntimeVariantValue?A VBVariantValue expression containing the value to return if no value is set in the key setting.
Optional: defaults to ZeroLengthString.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets a VBStringValue representing the key setting value from the specified application's entry in an implementation-defined application registry if it exists; gets the specified defaultValue otherwise.
StdInteraction__IIf(VBRuntimeVariantValue, VBRuntimeVariantValue, VBRuntimeVariantValue)
MS-VBAL 6.1.2.8.1.11 IIf
RuntimeSemanticsEvaluationResult StdInteraction__IIf(VBRuntimeVariantValue expression, VBRuntimeVariantValue truePart, VBRuntimeVariantValue falsePart)
Parameters
expressionVBRuntimeVariantValuetruePartVBRuntimeVariantValuefalsePartVBRuntimeVariantValue
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Returns one of two parts, depending on the evaluation of an expression.
💡 The wording of how this function and its parameters are specified does not exclude 🧩VBDeferredValue language core extension values that could...
fix the confusion around this function while opening the door to something like first-class delegates in (extended) RD-VBA.
StdInteraction__InputBox(VBRuntimeVariantValue, VBRuntimeVariantValue?, VBRuntimeVariantValue?, VBRuntimeVariantValue?, VBRuntimeVariantValue?, VBRuntimeVariantValue?, VBRuntimeVariantValue?)
MS-VBAL 6.1.2.8.1.12 InputBox
RuntimeSemanticsEvaluationResult StdInteraction__InputBox(VBRuntimeVariantValue prompt, VBRuntimeVariantValue? title = null, VBRuntimeVariantValue? defaultValue = null, VBRuntimeVariantValue? xpos = null, VBRuntimeVariantValue? ypos = null, VBRuntimeVariantValue? helpFile = null, VBRuntimeVariantValue? helpContext = null)
Parameters
promptVBRuntimeVariantValueA VBStringValue expression containing the message to be displayed in the dialog box.
titleVBRuntimeVariantValue?A VBStringValue expression containing the title of the dialog box.
Optional: uses the name of the workspace project if omitted.defaultValueVBRuntimeVariantValue?A VBStringValue expression containing the default (pre-filled) value.
Optional: defaults to ZeroLengthString.xposVBRuntimeVariantValue?A VBLongValue expression containing the horizontal distance (measured in twips) of the left edge of the dialog box from the left edge of the screen.
Optional: dialog is horizontally centered if omitted.yposVBRuntimeVariantValue?A VBLongValue expression containing the vertical distance (measured in twips) of the top edge of the dialog box from the top edge of the screen.
Optional: dialog is vertically centered if omitted.helpFileVBRuntimeVariantValue?ℹ️ Unsupported legacy proprietary Microsoft help system. This parameter is out of scope of this implementation.
helpContextVBRuntimeVariantValue?ℹ️ Unsupported legacy proprietary Microsoft help system. This parameter is out of scope of this implementation.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns a VBStringValue containing the user-provided input.
StdInteraction__MsgBox(VBRuntimeVariantValue, VBMsgBoxStyle, VBRuntimeVariantValue?, VBRuntimeVariantValue?, VBRuntimeVariantValue?)
MS-VBAL 6.1.2.8.1.13 MsgBox
RuntimeSemanticsEvaluationResult StdInteraction__MsgBox(VBRuntimeVariantValue prompt, VBMsgBoxStyle buttons = VBMsgBoxStyle.VBApplicationModal, VBRuntimeVariantValue? title = null, VBRuntimeVariantValue? helpFile = null, VBRuntimeVariantValue? helpContext = null)
Parameters
promptVBRuntimeVariantValueA VBStringValue expression containing the message to be displayed in the dialog box.
buttonsVBMsgBoxStyleA VBMsgBoxStyle expression containing the sum of values specifying the number and type of buttons to display, the icon style to use, the identity of the default button, and the modality of the message box.
Optional: defaults to VBDefaultButton1 (VBIntegerValue0).titleVBRuntimeVariantValue?A VBStringValue expression containing the title of the dialog box.
Optional: uses the name of the workspace project if omitted.helpFileVBRuntimeVariantValue?ℹ️ Unsupported legacy proprietary Microsoft help system. This parameter is out of scope of this implementation.
helpContextVBRuntimeVariantValue?ℹ️ Unsupported legacy proprietary Microsoft help system. This parameter is out of scope of this implementation.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Displays a message in a dialog box, waits for the user to click a button, and returns a VBMsgBoxResult value indicating which button the user clicked.
StdInteraction__Partition(VBRuntimeVariantValue, VBRuntimeVariantValue, VBRuntimeVariantValue, VBRuntimeVariantValue)
MS-VBAL 6.1.2.8.1.14 Partition
RuntimeSemanticsEvaluationResult StdInteraction__Partition(VBRuntimeVariantValue number, VBRuntimeVariantValue start, VBRuntimeVariantValue stop, VBRuntimeVariantValue interval)
Parameters
numberVBRuntimeVariantValueA VBLongValue expression containing the value to be evaluated against the range.
startVBRuntimeVariantValueA VBLongValue expression containing the start of the overall range of numbers.
👉 The numeric value of this parameter cannot be less than0💥InvalidProcedureCallOrArgument.stopVBRuntimeVariantValueA VBLongValue expression containing the end of the overall range of numbers.
👉 The numeric value of this parameter cannot be less than or equal to thestartvalue 💥InvalidProcedureCallOrArgument.intervalVBRuntimeVariantValueA VBLongValue expression containing the interval of each range of numbers.
👉 The numeric value of this parameter cannot be less than1💥InvalidProcedureCallOrArgument.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Returns a VBStringValue indicating where a number occurs within a calculated series of ranges.
StdInteraction__SCommand()
MS-VBAL 6.1.2.8.1.3 Command$
RuntimeSemanticsEvaluationResult StdInteraction__SCommand()
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets a VBStringValue containing the command-line arguments (if any) that were used to initiate the execution of the currently running workspace application.
StdInteraction__SEnviron(VBRuntimeVariantValue)
MS-VBAL 6.1.2.8.1.6 Environ$
RuntimeSemanticsEvaluationResult StdInteraction__SEnviron(VBRuntimeVariantValue key)
Parameters
keyVBRuntimeVariantValueA VBStringValue, or a data value that is let-coercible to VBLongValue.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets a VBStringValue associated with an implementation-defined environment variable.
StdInteraction__Shell(VBRuntimeVariantValue, VBAppWinStyle)
MS-VBAL 6.1.2.8.1.15 Shell
RuntimeSemanticsEvaluationResult StdInteraction__Shell(VBRuntimeVariantValue path, VBAppWinStyle windowStyle = VBAppWinStyle.VBMinimizedFocus)
Parameters
pathVBRuntimeVariantValueA VBStringValue expression containing the value to be evaluated against the range.
windowStyleVBAppWinStyleA VBIntegerValue (VBAppWinStyle) expression containing a value that sets the style of the window in which the program is to be executed.
Optional: VBMinimizedFocus unless specified otherwise.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Asynchronously runs an executable program and returns a VBDoubleValue representing the implementation-defined program's task ID (or process ID) if successful, otherwise returns the data value 0.
StdInteraction__Switch(params VBRuntimeVariantValue[])
MS-VBAL 6.1.2.8.1.16 Switch
RuntimeSemanticsEvaluationResult StdInteraction__Switch(params VBRuntimeVariantValue[] varExpr)
Parameters
varExprVBRuntimeVariantValue[]A VBArrayValue containing VBVariantValue elements representing expressions to be evaluated.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Evaluates a list of expressions and returns a VBVariantValue or an expression associated with the first expression in the list that evaluates to the data value True.
- The expressions are evaluated left to right;
- The first element (at index
n+0) in thenth pair of values is the expression to be evaluated; - The second element (at index
n+1) in thenth pair of values is the associated value to return if the first element evaluates toTrue; - 💥InvalidProcedureCallOrArgument if the expressions aren't properly paired.
👉 There seems to be a 🧩
VBDeferredValue language core extension opportunity here, too. See: StdInteraction__IIf(VBRuntimeVariantValue, VBRuntimeVariantValue, VBRuntimeVariantValue)
StdInteraction__VCommand()
MS-VBAL 6.1.2.8.1.3 Command
RuntimeSemanticsEvaluationResult StdInteraction__VCommand()
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets a VBVariantValue containing the command-line arguments (if any) that were used to initiate the execution of the currently running workspace application.
StdInteraction__VEnviron(VBRuntimeVariantValue)
MS-VBAL 6.1.2.8.1.6 Environ
RuntimeSemanticsEvaluationResult StdInteraction__VEnviron(VBRuntimeVariantValue key)
Parameters
keyVBRuntimeVariantValueA VBStringValue, or a data value that is let-coercible to VBLongValue.
Returns
- RuntimeSemanticsEvaluationResult
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
Gets a VBVariantValue (VBStringValue) associated with an implementation-defined environment variable.