View Single Post
 
Old 10-24-2019, 04:23 PM
JohnWilson JohnWilson is offline Windows 10 Office 2016
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

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
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote