title: How to distinguish different action that tragger worksheet change event
body: <p>I has Validation on cells, when input break the validation a message box will pop up.</p>
  <p>To avoid the copy paste data break validation, I use macro to validate the pase data.</p>
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
  
      Dim Cell As Range
      Dim KeyCells As Range
      Dim ValidCells As Range
      Dim Fail As Boolean
      
      Let Fail = False
      Set KeyCells = Range(&quot;A2:D2000&quot;)
      Set ValidCells = Application.Intersect(Target, KeyCells)
  
      If Not ValidCells Is Nothing Then
          For Each Cell In ValidCells
              If Not Cell.Validation.Value Then
                  Cell.Interior.Color = RGB(255, 0, 0)
                  Let Fail = True
              Else
                  Cell.Interior.Color = xlNone
              End If
          Next
          
          If Fail Then
              MsgBox &quot;Please rectify the red background data&quot;
          End If
      End If
  End Sub
  </code></pre>
  <p>This works well when copy paste data. Except when input wrong data, it will pop up many MsgBox（triggered by Validation and Macro）.</p>
  <p>Is there a way to distinguish what action traggers the change event, So I can choose if needed to show MsgBox in the macro.</p>