NumericValues Property
This property affects the way your scripts refer to selected items
in select lists, multi-select lists, select menus, checkbox groups, and
radio button groups. If this property is False (the default), then selected
items in these controls are referred to by their captions or text values.
If this property is True, then selected items these controls are referred
to by positional index.
object.NumericValues
= new_state
existing_state = object.NumericValues
Arguments
|
object |
|
Required. A
variable containing a dialog object created by calling CreateObject or
new ActiveXControl. |
|
new_state |
|
Required. True if selected items are referred
to by index; False if they are referred to by caption. |
|
existing_state |
|
Required. True if selected items are referred
to by index; False if they are referred to by caption. |
Remarks
You may want to refer to items by index when some captions are duplicated
or are very long or hard to type.
Example
Sub main
Set Dialog = CreateObject("TPFSoftware.ScriptDialog")
Dialog.NumericValues = True
Dialog.AddSelectList "Nonsense", "Nonsense:", _
Array("fee", "fi", "fo"), 1
Dialog.AddMultiSelectList "Nonsense2", "Nonsense2:", _
Array("fee", "fi", "fo"), Array(1,2)
Set Result = Dialog.Execute
End Sub
|