<工作表事件區>
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Target
On Error Resume Next
Set xArea = Nothing
If .Count > 1 Then Exit Sub
Application.EnableEvents = False
Set xArea = .DirectPrecedents
If Not xArea Is Nothing Then Set xArea = Union(.Cells, xArea)
End With
Application.EnableEvents = True
[IV1].Calculate
End Sub
<一般模組區>
Public xArea As Range
Function XXX(xA As Range) As Long
If Not Intersect(xArea, xA) Is Nothing Then XXX = 1
End Function
<儲存格.格式化條件>
B5:=xxx(B5) 設黃底色或自訂
公式格,及被參照格都要照此設定作者: K_Wing 時間: 2015-10-31 08:03
提供以下方案,參考看看(此方式不影響復原功能)
<工作表事件區>
Private Sub Worksheet_Selectio ...
准提部林 發表於 2015-10-29 21:20