Kruuger,
Take a look at the attached code, it should hopefully perform as required.
The code isn't pretty and could probably be optimised somewhat, but it provides a working solution for the time being. There is a current restriction in that it doesn't like selection of a title row, but this could be avoided in a future version by detecting the presence of the title row in the table and testing whether the user's selection includes such title row.
I have found a bug with the
SetCellGridColor method: after the cell grid color has been changed, undo'ing this change, although visually seems to reset the cell grid colour, it doesn't seem to properly undo the operation since the cell grid colour will revert back to the modified colour when the table is copied, or if the grid colour of other cells in the table is changed.