Private Sub CommandButton11_Click()
Dim X As Long
With Worksheets("Sheet3")
For X = 1 To 10
If X <> 5 Then
.OLEObjects("CommandButton" & X).Object.BackColor = vbBlack
End If
Next
End With
End Sub
Note: If you want to change all the buttons BackColor, then just remove the
If..Then and End..If statements. If you want to exclude other buttons for
being changed to black, just Or them into the If..Then list along with the
X<>5 exclusion.
--
Rick (MVP - Excel)
"K" <kamra...@yahoo.co.uk> wrote in message
news:45f35af2-62ee-4a58...@w39g2000prb.googlegroups.com...
Thanks lot Rick. You are genious