0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Excel VBA】任意の列の値変更をイベントハンドリングする。

Posted at

メモとして残します。

Sheetモジュールに下記を追記

■やり方

Private Sub Worksheet_Change(ByVal Target As Range)
    ' I列以外のchangeは以降処理しないようにする。
    If Intersect(Target, Range("I1:I" & Rows.Count)) Is Nothing Then
        Exit Sub
    End If

    '処理・・・・・・・・
    'Target.Cells.Item(1) '変更されたセルのオブジェクト

End Sub

■さいごに

あくまでシート全体での検知を第一段階でやる必要があるため、複数列やる場合は Worksheet_Change 内でさらに分岐してやる必要があります。
なので、疑似的なハンドリングになりますね。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?