rpaulson
Well-known Member
- Joined
- Oct 4, 2007
- Messages
- 1,428
Hello all,
Working on a user form
Here is some of my code
If the user select a button it will toggle the button color between green and gray.
What I would like to do is if the user selects a button (ie CommandButton4) it will turn that button green and turn the res of them gray.
Thanks for taking a look.
Ross
Working on a user form
Here is some of my code
Code:
Sub Toggle(Button)
With Button
If .BackColor = &H8000000F Then
.BackColor = &H80FF80
.Font.Bold = True
.Font.Size = 36
Else
.BackColor = &H8000000F
.Font.Bold = False
.Font.Size = 18
End If
End With
End Sub
Private Sub CommandButton1_Click()
Call Toggle(CommandButton1)
End Sub
Private Sub CommandButton2_Click()
Call Toggle(CommandButton2)
End Sub
Private Sub CommandButton3_Click()
Call Toggle(CommandButton3)
End Sub
Private Sub CommandButton4_Click()
Call Toggle(CommandButton4)
End Sub
Private Sub CommandButton5_Click()
Call Toggle(CommandButton5)
End Sub
If the user select a button it will toggle the button color between green and gray.
What I would like to do is if the user selects a button (ie CommandButton4) it will turn that button green and turn the res of them gray.
Thanks for taking a look.
Ross