Article ID: 182699
Article Last Modified on 6/17/2005
' Variable to hold name of ToggleButton that was clicked.
Public Clicked As String
Sub ExclusiveToggleButtons()
Dim Toggle As Control
' Loop through all of the ToggleButtons on Frame1.
For Each Toggle In UserForm1.Frame1.Controls
' If Name of ToggleButton matches name of ToggleButton
' that was clicked...
If Toggle.Name = clicked Then
'...select the button.
Toggle.Value = True
Else
'...deselect the button.
Toggle.Value = False
End If
Next
End Sub
Private Sub ToggleButton1_MouseUp(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Clicked = ToggleButton1.Name
Application.OnTime Now, "ExclusiveToggleButtons"
End Sub
Private Sub ToggleButton2_MouseUp(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Clicked = ToggleButton2.Name
Application.OnTime Now, "ExclusiveToggleButtons"
End Sub
Private Sub ToggleButton3_MouseUp(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Clicked = ToggleButton3.Name
Application.OnTime Now, "ExclusiveToggleButtons"
End Sub
179216 OFF98: How to Use the Microsoft Office Installer Program
Additional query words: XL98 toggle
Keywords: kbhowto kbprogramming kbdtacode KB182699