<< Click to Display Table of Contents >>
RemoveLink |
RemoveLink(Property)
This method removes a Link from a property specified by Property, if it exists. If a Link to the specified property does not exist, this method has no effect. The next script contains an example of using this method.
Sub CommandButton2_Click()
On Error Resume Next
Dim Bind
Set Bind = Screen.Item("ScrollBar1").Links.Item("Value")
If Bind Is Nothing Then
' If the link does not exist
MsgBox "ScrollBar1 is not linked."
Else
MsgBox "ScrollBar1 is linked to '" & Bind.Source & "'"
MsgBox "Removing the link."
Screen.Item("ScrollBar1").Links.RemoveLink("Value")
End If
End Sub