OnValue

<< Click to Display Table of Contents >>

 

OnValue

Variant This property specifies the value a property assumes when source's expression returns True. The next script contains an example of using this property.

Sub OnValue_Click()
  On Error Resume Next
  Dim Value
  If Application.ShowPickColor_
    (Value, ForegroundColor, 400, 300) Then
    Dim Bind
    Set Bind = Screen.Item("Rectangle1").Links._
      Item("ForegroundColor")
    If Bind Is Nothing Then
      MsgBox "Rectangle1 has no link."
    Else
      MsgBox "Rectangle1 is linked to "& Bind.Source & " "
      MsgBox "Changing OnValue from " &_
        Bind.OnValue & " to " & Value
      Bind.OnValue = Value
    End If
    ForegroundColor = Value
  End If
End Sub

Was this page useful?