Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一些代码可以更改整行的颜色,在选择单元格时突出显示它。问题是当我希望该行回到前面的颜色时。
Rows(ActiveCell.Row).Interior.ColorIndex = 15
这总是将其更改为颜色 15,但我想将前颜色保留在变量中以在此处使用它。我该怎么做?
非常感谢 :)
'declare your new variable Dim anteriorColor 'set your new variable anteriorColor = Rows(ActiveCell.Row).Interior.ColorIndex