1
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
Set KeyCells = Range("z12:z15")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
If Range("Z12:Z45).value = "yes" then
MsgBox "Cell " & Target.Address & " has changed."
End If
End If
End Sub
この問題を解決するには問題があります。どんな助けもありがとう。 VBAで TXVBAが優秀なセル範囲のマクロを実行します。
ルイージ
「ターゲット」(変更された)範囲のセルに「はい」があるかどうかを確認する必要がありますか? –
そうです。このコードは今私にエラーを与えている。 –
_Target_は範囲です...使用する '... Application.Intersect(KeyCells、Target)...' – jsotola