Value

This property returns and sets a value indicating the state of a control.

Syntax

object.Value [= value]

Parameters

object
Reference to a control with a Value property.
value
Value that specifies the state, content, or position of a control. Following are the settings for value:
CheckBox
0 is unchecked (default), 1 is checked, and 2 is grayed (dimmed).
CommandButton
True indicates the button is chosen; False (default) indicates the button is not chosen. Setting the Value property to True in code invokes the button's Click event.
HScrollBar and VScrollBar
Set values from –32,768 through 32,767 to position the scroll box.
OptionButton
True indicates the button is selected; False (default) indicates the button is not selected.
CommandBarButton
0 indicates the button is not pressed (default); 1 indicates the button is pressed.

Remarks

CheckBox, CommandBarButton and OptionButton controls
Returns and sets the state of the control.
CommandButton control
Returns and sets a value indicating whether the button is chosen; not available at design time.
HScrollBar and VScrollBar controls (horizontal and vertical scroll bars)
Returns and sets the current position of the scroll bar, whose return value is always between the values specified in the Max and Min properties.