How do I specify different BackColor for each cell in a table

  • Thread starter Thread starter Suji
  • Start date Start date
S

Suji

I have a table with many rows and columns. Based of certain criteria, I am
trying to give different Backcolor to each cell, i.e. to hightlight certain
events.

My code looks like (in a loop):

For iRow = 1 To ppTextBoxItem.Table.Rows.Count
For iColumn = 1 To ppTextBoxItem.Table.Columns.Count
ppTextBoxItem.Table.Cell(iRow, iColumn).Shape.Fill.Visible = True
ppTextBoxItem.Table.Cell(iRow, iColumn).Shape.Fill.BackColor.RGB =
iBackColor
Next
Next


The above code is not working as it retains the original backcolor of the
cell i.e. does not change to new specified color.
 
I tried using the .ForeColor, and it works now on a textbox.

But still does not work on a Table Cells within a textbox.
 
Many Thanks John. Actually, it works now. I tried it on a different table.
The original table I had, might have some other properties set, which was
stopping it from happening. So your solution was great, Cheers!
 
Back
Top