Value property (NumericInput and StringInput objects)

Returns or sets the value that is displayed in the field. Read/write. Variant.
This is the default property of the NumericInput and StringInput objects.
To ensure that the returned value is the actual value of the tag, the field must be configured as
Continuously Update
.
An Error value is returned by a wire-framed NumericInput or StringInput object. When the object goes wire frame, the Change event is fired. The IsError() VB function can be used to check if the value is in error.
If the field is in
update state
when a value is written to it, the field will go into
input state
and remain there until the value is downloaded or the state is changed back to updating. This happens when the user presses the ESC key or runs code that sets the state to
update
(object.State = gfxInputFieldStateUpdate).
Syntax
object
.
Value
[ =
value
]
where
object
– is the name of a NumericInput or StringInput object or an expression that evaluates to a NumericInput or StringInput object.
value
– is the value that is to be returned or set.
Remarks
  • Setting the value of a NumericInput or StringInput field does not move the focus to the field.
  • When a value being written to the field is larger than the field, the width of the field does not change to accommodate the returned value. Anything beyond the width of the field will not be displayed, but will be retained as the value for the field.
Example
Private Sub NumericInput1_Change() If IsError(NumericInput1.Value) Then Application.LogDiagnosticsMessage "NumericInput1 is in error state", ftDiagSeverityError Else Application.LogDiagnosticsMessage "NumericInput1.Value = " & NumericInput1.Value End If End Sub
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal