A
andreas
Dear Experts:
I would like to have below macro altered to achieve the following in a
table with several different shadings of different colours:
- the RGB values (Red, Blue, Green) is to be taken from the currently
selected cell and then
- ... inserted into the <SelectedCellShading> part of below macro
Is this feasible?
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
Sub Change_Shading_SelectedTable()
Dim oTable As Table
Dim aCell As Cell
Set oTable = Selection.Tables(1)
With oTable
For Each aCell In oTable.Range.Cells
If aCell.Shading.BackgroundPatternColor =
<SelectedCellShading> Then
aCell.Shading.BackgroundPatternColor = RGB(222, 222, 222)
End If
Next aCell
End With
End Sub
I would like to have below macro altered to achieve the following in a
table with several different shadings of different colours:
- the RGB values (Red, Blue, Green) is to be taken from the currently
selected cell and then
- ... inserted into the <SelectedCellShading> part of below macro
Is this feasible?
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
Sub Change_Shading_SelectedTable()
Dim oTable As Table
Dim aCell As Cell
Set oTable = Selection.Tables(1)
With oTable
For Each aCell In oTable.Range.Cells
If aCell.Shading.BackgroundPatternColor =
<SelectedCellShading> Then
aCell.Shading.BackgroundPatternColor = RGB(222, 222, 222)
End If
Next aCell
End With
End Sub