Return background color of selected cell

前端 未结 4 1238
终归单人心
终归单人心 2020-12-10 01:09

I have a spreadsheet which cells in are colored meaningfully.

Does any body know how i can return the background color value of a current cell in Excel sheet?

4条回答
  •  醉梦人生
    2020-12-10 01:56

    Maybe you can use this properties:

    ActiveCell.Interior.ColorIndex - one of 56 preset colors
    

    and

    ActiveCell.Interior.Color - RGB color, used like that:
    
    ActiveCell.Interior.Color = RGB(255,255,255)
    

提交回复
热议问题