更改单元格颜色

时间:2019-07-25 14:49:45

标签: excel vba

我想更改单元格中的颜色

MyColour = Range("A" & myRow).Cells.Interior.Color  ' <<< THIS line doesn't work !

Range("A" & myRow).Cells.Interior.Color = Range("A" & myRow-3).Cells.Interior.Color

,然后再将其更改回。

Range("A" & myRow).Cells.Interior.Color = MyColour

1 个答案:

答案 0 :(得分:0)

问题:

  • 使用.Cells

此处:

MyColour = Range("A" & myRow).Interior.Color

Range("A" & myRow).Interior.Color = Range("A" & myRow - 3).Interior.Color

Range("A" & myRow).Interior.Color = MyColour