| 
    
     |  | 今晩は。 
 >If Target.Value = Empty Then
 >   Application.EnableEvents = False
 >   Range(Target.Offset(, 1), Target.Offset(, 7)).ClearContents
 >
 > というコードを書き、クリアされた行の変化で実行されるイベントが起こらないようにしたいのですが、なぜかChangeイベントが動いてしまいます。 ちなみに上記のClearcontentsの命令は実行されています。
 
 Application.EnableEvents = False の位置は(1)の所だと思います。これで、
 
 > テストのためApplication.EnableEventsはこの後Trueにしていないのですが、その後の操作でもイベントは動いています。
 
 の問題は解決ですね。
 
 Private Sub Worksheet_Change(ByVal Target As Range)
 Application.EnableEvents = False  '<==(1)
 If Target.Value = Empty Then
 Range(Target.Offset(, 1), Target.Offset(, 7)).ClearContents
 End If
 Application.EnableEvents = True
 End Sub
 
 ただし、こうすると、これ以降のイベントは、発生しなくなります。
 
 ということで、このコードからすると、多分、次のようにすべきでしょうね。
 
 Private Sub Worksheet_Change(ByVal Target As Range)
 Application.EnableEvents = False
 If Target.Value = Empty Then
 Range(Target.Offset(, 1), Target.Offset(, 7)).ClearContents
 End If
 Application.EnableEvents = True
 End Sub
 
 試してみてください。
 
 |  |