Returns or sets the value of the control.
Read-write property
object.Value = [ value ] |
Variant
The Variant subtype of the return value is based on the type of Control being referenced. The following table shows the subtypes returned for each control:
Control | Subtype |
---|---|
BUTTON | Integer |
CHECKBOX | Boolean |
COMBOBOX | String |
DATETIME | Date |
EDIT | String |
IMAGEBOX | String |
LABEL | String |
LISTBOX | String |
RADIOBUTTON | Boolean |
SLIDER | Integer |
UPDOWN | Empty |
The Value property is the default property for the Control object. Therefore, the following two lines of code will yield the same result:
objButton.Value = True
objButton = True
When setting the text displayed in an Edit control via a script, use the Value property instead of the Text property.