Skip to content

非完美解决方案,待补充。

参考资料:

  1. https://docs.microsoft.com/en-us/office/vba/excel/concepts/cells-and-ranges/highlight-the-active-cell-row-or-column
  2. ColorIndex 值与颜色对照表

Highlighting the Entire Row and Column that Contain the Active Cell

The following code example clears the color in all the cells on the worksheet by setting the ColorIndex property equal to 0, and then highlights the entire row and column that contain the active cell by using the EntireRow and EntireColumn properties.

VB 代码: image.png

Made with ❤️