Private Sub Worksheet_Change(ByVal Target As Range)
Dim r1 As Range
Set r1 = Range("A1:B10")
If Intersect(Selection, r1) Is Nothing Then Exit Sub ' how to write this line ?
MsgBox "323"
End Sub
我只想在MsgBox中选择并更改r1中的某个单元格,而不是通过运行另一个更改此单元格的代码。如何仅在手动选择目标时运行Workseet_Change事件?
这两个解决方案的工作原理。非常感谢。 – Alegro