求VBA代码 excel中选中单元格,高亮显示这行每个单元格边框和整行!

[复制链接]
查看11 | 回复2 | 2012-3-27 21:40:14 | 显示全部楼层 |阅读模式
Private r1 As Long '前一个选定的行号public Const r0 = 65536 '可以调整为不使用的行号Private Sub Worksheet_SelectionChange(ByVal Target As Range)Application.EnableEvents = FalseIf r1 > 0 Then
Rows(r0).Copy
Rows(r1).PasteSpecial Paste:=xlPasteFormatsEnd Ifr1 = Target.RowRows(r1).CopyRows(r0).PasteSpecial Paste:=xlPasteFormat...
回复

使用道具 举报

千问 | 2012-3-27 21:40:14 | 显示全部楼层
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveCell.CurrentRegion
.Interior.ColorIndex = 0
.Borders.LineStyle = 1
.Cells(Active...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行