All,

have some VBA code in powerpoint that I am using to add details to a table that has been created on a slide.

I am wanting to set the fill colour of a cell in that table and I had thought it was working but now every time I run through it doesn't error but it doesn't fill the cell?

I am not sure what is going on so any help here would be appreciated.

VB Code:
  1. If oShp.HasTextFrame Then
  2.                 Set txtRng = oShp.TextFrame.TextRange
  3.                 Set foundText = txtRng.Find(FindWhat:="GREEN", MatchCase:=True, WholeWords:=True)
  4.                 Do While Not (foundText Is Nothing)
  5.                     With foundText
  6.                        
  7.                        
  8.                         ActivePresentation.Slides(1).Shapes(8).Table _
  9.                         .Cell(valTab, 9).Shape.TextFrame.TextRange.Text = "G"
  10.                            
  11.                         ActivePresentation.Slides(1).Shapes(8).Table _
  12.                         .Cell(valTab, 9).Shape.TextFrame.TextRange.Font.Bold = True
  13.                        
  14.                         valGreen = valGreen + 1
  15.                        
  16.                     End With
  17.                    
  18.                 ' This just isn't working and I don't know why?
  19.                 ActivePresentation.Slides(1).Shapes(8).Table _
  20.                 .Cell(valTab, 8).Shape.Fill.ForeColor.RGB = RGB(0, 100, 0)
  21.                
  22.                 Exit Do
  23.                 Loop
  24.             End If