excel能否选中一行或一列时,那行就变种颜色,进而比较明显使显示选中了哪

excel

1个回答

写回答

13838279438

2025-09-23 12:50

+ 关注

Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = xlNone '十字光标定位 Rows(Target.Row).Interior.Color = RGB(192, 192, 192) ‘行着色 Columns(Target.Column).Interior.Color = RGB(192, 192, 192) '列着色End Sub吧这个代码放到你的表格里RGB(192, 192, 192)中的数字为0-255 不同数字颜色不同,请自行调整

举报有用(4分享收藏

Copyright © 2025 IZhiDa.com All Rights Reserved.

知答 版权所有 粤ICP备2023042255号