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

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.
 
S

Suji

I tried using the .ForeColor, and it works now on a textbox.

But still does not work on a Table Cells within a textbox.
 
S

Suji

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top