Hello, I am having a problem with my code below.
In a Table in PowerPoint, the user clicks or selects table cells and this VBA shades the background of the cell(s) gray.
I need it to have blue text RGB(0,100,200) and a white border of 3 pt around the cell(s).
It works perfect apart from blue text and white borders. Grateful for your help. Thank you.
Public Sub GrayCell()
Dim X As Integer
Dim Y As Integer
Dim oTbl As Table
Set oTbl = ActiveWindow.Selection.ShapeRange(1).Table
For X = 1 To oTbl.Columns.Count
For Y = 1 To oTbl.Rows.Count
With oTbl.Cell(Y, X)
If .Selected <> False Then 'Strange bug - will ignore if statement entirely if you use "= True"
'Debug.Print "Test worked " & Now
.Shape.Fill.ForeColor.RGB = RGB(211,211,211)
End If
End With
Next 'y
Next 'x
End Sub