I'm new to VBA. I have the following VBA code in a workbook:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo sub_exit
If Target.Address = "$O$4" Then
Range("M11:O16,M22:O28").ClearContents
End If
sub_exit:
Application.EnableEvents = True
End Sub
However, I need another change to cause an event in a range. I need cells N11:N17 to clear contents when the selections in their corresponding cells in M11:M17 change and also for N22:N28 to clear contents when the selection in their corresponding cells M22:M28 change. (i.e. when a new selection is made in cell M11, then N11 clears).
I'm using Data Validation Lists in these cells if that matters.
Thanks for any insight someone could provide.
I found some information in the below thread, but I had a hard time following exactly what to enter for the above to work (again, I am COMPLETELY NEW to VBA).
http://www.excelforum.com/excel-prog...-multiple.html
Bookmarks