Excel VBA - How to Run Macro when Cell Changes

Описание к видео Excel VBA - How to Run Macro when Cell Changes

Excel VBA Learn how to run macro when cell changes.

The code used in this video:

Private Sub Worksheet_Change(ByVal Target As Range)
'MsgBox Target.Address
If Not Application.Intersect(Range("A1:A6"), Range(Target.Address)) Is Nothing Then
Call SampleMacro
End If
End Sub

Sub SampleMacro()
MsgBox "yes!"
End Sub

Комментарии

Информация по комментариям в разработке