I would use this to check for a command button as name like"CMD_* can fail
Sub ChangeCOMM()
Dim oshp As Shape
Dim osld As Slide
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoOLEControlObject Then
If oshp.OLEFormat.ProgID = "Forms.CommandButton.1" Then
oshp.OLEFormat.Object.BackColor = RGB(255, 0, 0) ' or whatever
End If
End If
Next oshp
Next osld
End Sub
|