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(VBObjectValue, string, VBCallType, params VBVariantValue[])
MS-VBAL 6.1.2.8.1.1 CallByName
RuntimeSemanticsEvaluationResult StdInteraction__CallByName(VBObjectValue objectValue, string procName, VBCallType callType, params VBVariantValue[] args)
Parameters
objectValueVBObjectValueThe object exposing the member to be invoked.
procNamestringThe name of the member to be invoked.
callTypeVBCallTypeThe type of member invocation.
argsVBVariantValue[]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(VBSingleValue, params VBVariantValue[])
MS-VBAL 6.1.2.8.1.2 Choose
RuntimeSemanticsEvaluationResult StdInteraction__Choose(VBSingleValue index, params VBVariantValue[] choice)
Parameters
indexVBSingleValueAn VBIntegerValue between 1 and the number of supplied choices.
choiceVBVariantValue[]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(VBStringValue, VBStringValue?)
MS-VBAL 6.1.2.8.1.4 CreateObject
RuntimeSemanticsEvaluationResult StdInteraction__CreateObject(VBStringValue objectClass, VBStringValue? serverName = null)
Parameters
objectClassVBStringValueA VBStringValue containing the application name and class of the object to create.
serverNameVBStringValueA 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(VBStringValue, VBStringValue)
MS-VBAL 6.1.2.8.1.7 GetAllSettings
RuntimeSemanticsEvaluationResult StdInteraction__GetAllSettings(VBStringValue appName, VBStringValue section)
Parameters
appNameVBStringValueA VBStringValue expression containing the name of the application or project whose key settings are requested.
sectionVBStringValueA 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(VBStringValue)
MS-VBAL 6.1.2.8.1.8 GetAttr
RuntimeSemanticsEvaluationResult StdInteraction__GetAttr(VBStringValue pathName)
Parameters
pathNameVBStringValueA 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(VBStringValue, VBStringValue?, VBVariantValue?)
🧩 RD-VBAL 6.1.2.8.1.10.1 GetJsonSetting
RuntimeSemanticsEvaluationResult StdInteraction__GetJsonSetting(VBStringValue key, VBStringValue? config = null, VBVariantValue? defaultValue = null)
Parameters
keyVBStringValueA VBStringValue expression containing the managed configuration path (e.g.
"Configuration:ConnectionStrings:AppDb") of the configuration section whose key settings are requested.configVBStringValueA 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").defaultValueVBVariantValueA 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(VBStringValue, VBStringValue?)
🧩 RD-VBAL 6.1.2.8.1.7.1 GetJsonSettings
RuntimeSemanticsEvaluationResult StdInteraction__GetJsonSettings(VBStringValue key, VBStringValue? config = null)
Parameters
keyVBStringValueA VBStringValue expression containing the managed configuration path (e.g.
"Configuration:ConnectionStrings") of the configuration section whose key settings are requested.configVBStringValueA 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(VBVariantValue?, VBVariantValue?)
MS-VBAL 6.1.2.8.1.9 GetObject
RuntimeSemanticsEvaluationResult StdInteraction__GetObject(VBVariantValue? pathName = null, VBVariantValue? className = null)
Parameters
pathNameVBVariantValueA VBStringValue expression containing the name of the network server where the object will be created.
Optional: the local machine is used unless specified otherwise.classNameVBVariantValueA 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(VBStringValue, VBStringValue, VBStringValue, VBVariantValue?)
MS-VBAL 6.1.2.8.1.10 GetSetting
RuntimeSemanticsEvaluationResult StdInteraction__GetSetting(VBStringValue appName, VBStringValue section, VBStringValue key, VBVariantValue? defaultValue = null)
Parameters
appNameVBStringValueA VBStringValue expression containing the name of the application or project whose key settings are requested.
sectionVBStringValueA VBStringValue expression containing the name of the configuration section whose key settings are requested.
keyVBStringValueA VBStringValue expression containing the key of the requested key setting value.
defaultValueVBVariantValueA 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(VBVariantValue, VBVariantValue, VBVariantValue)
MS-VBAL 6.1.2.8.1.11 IIf
RuntimeSemanticsEvaluationResult StdInteraction__IIf(VBVariantValue expression, VBVariantValue truePart, VBVariantValue falsePart)
Parameters
expressionVBVariantValuetruePartVBVariantValuefalsePartVBVariantValue
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(VBVariantValue, VBVariantValue?, VBVariantValue?, VBVariantValue?, VBVariantValue?, VBVariantValue?, VBVariantValue?)
MS-VBAL 6.1.2.8.1.12 InputBox
RuntimeSemanticsEvaluationResult StdInteraction__InputBox(VBVariantValue prompt, VBVariantValue? title = null, VBVariantValue? defaultValue = null, VBVariantValue? xpos = null, VBVariantValue? ypos = null, VBVariantValue? helpFile = null, VBVariantValue? helpContext = null)
Parameters
promptVBVariantValueA VBStringValue expression containing the message to be displayed in the dialog box.
titleVBVariantValueA VBStringValue expression containing the title of the dialog box.
Optional: uses the name of the workspace project if omitted.defaultValueVBVariantValueA VBStringValue expression containing the default (pre-filled) value.
Optional: defaults to ZeroLengthString.xposVBVariantValueA 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.yposVBVariantValueA 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.helpFileVBVariantValueℹ️ Unsupported legacy proprietary Microsoft help system. This parameter is out of scope of this implementation.
helpContextVBVariantValueℹ️ 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(VBVariantValue, VBMsgBoxStyle, VBVariantValue?, VBVariantValue?, VBVariantValue?)
MS-VBAL 6.1.2.8.1.13 MsgBox
RuntimeSemanticsEvaluationResult StdInteraction__MsgBox(VBVariantValue prompt, VBMsgBoxStyle buttons = VBMsgBoxStyle.VBApplicationModal, VBVariantValue? title = null, VBVariantValue? helpFile = null, VBVariantValue? helpContext = null)
Parameters
promptVBVariantValueA 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).titleVBVariantValueA VBStringValue expression containing the title of the dialog box.
Optional: uses the name of the workspace project if omitted.helpFileVBVariantValueℹ️ Unsupported legacy proprietary Microsoft help system. This parameter is out of scope of this implementation.
helpContextVBVariantValueℹ️ 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(VBVariantValue, VBVariantValue, VBVariantValue, VBVariantValue)
MS-VBAL 6.1.2.8.1.14 Partition
RuntimeSemanticsEvaluationResult StdInteraction__Partition(VBVariantValue number, VBVariantValue start, VBVariantValue stop, VBVariantValue interval)
Parameters
numberVBVariantValueA VBLongValue expression containing the value to be evaluated against the range.
startVBVariantValueA VBLongValue expression containing the start of the overall range of numbers.
👉 The numeric value of this parameter cannot be less than0💥InvalidProcedureCallOrArgument.stopVBVariantValueA 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.intervalVBVariantValueA 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(VBVariantValue)
MS-VBAL 6.1.2.8.1.6 Environ$
RuntimeSemanticsEvaluationResult StdInteraction__SEnviron(VBVariantValue key)
Parameters
keyVBVariantValueA 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(VBVariantValue, VBAppWinStyle)
MS-VBAL 6.1.2.8.1.15 Shell
RuntimeSemanticsEvaluationResult StdInteraction__Shell(VBVariantValue path, VBAppWinStyle windowStyle = VBAppWinStyle.VBMinimizedFocus)
Parameters
pathVBVariantValueA 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 VBVariantValue[])
MS-VBAL 6.1.2.8.1.16 Switch
RuntimeSemanticsEvaluationResult StdInteraction__Switch(params VBVariantValue[] varExpr)
Parameters
varExprVBVariantValue[]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(VBVariantValue, VBVariantValue, VBVariantValue)
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(VBVariantValue)
MS-VBAL 6.1.2.8.1.6 Environ
RuntimeSemanticsEvaluationResult StdInteraction__VEnviron(VBVariantValue key)
Parameters
keyVBVariantValueA 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.