View Single Post
 
Old 07-29-2016, 04:56 PM
IIOII IIOII is offline Windows 10 Office 2010 32bit
Novice
 
Join Date: Jul 2016
Posts: 6
IIOII is on a distinguished road
Default

Resolved. You have to check whether the shape is an OLE control:

Code:
For Each oTB In ActivePresentation.Slides(1).Shapes
            If oTB.Type = msoOLEControlObject Then
                If oTB.OLEFormat.Object.Name = c Then
                    oTB.OLEFormat.Object.Text = TaskStatus
                    If TaskStatus = "B" Then oTB.OLEFormat.Object.BackColor = RGB(0, 0, 255)
                    If TaskStatus = "R" Then oTB.OLEFormat.Object.BackColor = RGB(255, 0, 0)
                    If TaskStatus = "A" Then oTB.OLEFormat.Object.BackColor = RGB(255, 204, 0)
                    If TaskStatus = "G" Then oTB.OLEFormat.Object.BackColor = RGB(0, 255, 0)
                    Exit For
                End If
            End If
        Next oTB
Reply With Quote