|
本帖最后由 fcdd 于 2013-6-29 15:24 编辑
以下代码为;光标无论 移动 到任何工作表单元格时,该单元格就会以背景色填充
代码存放于:“ThisWorkbook”中
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Row > 0 Then
On Error Resume Next
[ChangColor_With].FormatConditions.Delete
'Target.EntireRow.Name = "ChangColor_With"
Target.Name = "ChangColor_With"
With [ChangColor_With].FormatConditions
.Delete
.Add xlExpression, , "TRUE"
.Item(1).Interior.ColorIndex = 36
End With
End If
End Sub
求高手高手高高手帮帮忙改一改 目的只有一个“代码只限某 工作表一和工作表二 有效”
还请高手高手高高手帮帮忙 每行解释代码意思 |
|