Toggle Buttons

B

Bill

I have a form with 10 toggle buttons. Each toggle button uses the same code.
How can I change the code so that is uses one piece of code instead on ten
sets of code.

Private Sub ToggleButton11_Click()
If ToggleButton11.Value = True Then
ToggleButton11.Caption = " "
ToggleButton11.BackColor = RGB(0, 255, 0)
Else
ToggleButton11.Caption = " "
ToggleButton11.BackColor = RGB(255, 0, 0)
End If
End Sub

Thanks Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top