I could sure use some help on sorting this one out.
I have a sheet on which I would like to cause a YesNo MsgBox to open whenever an entry (or deletion) is made in the following range:
Range("E10:E19,L10,L19")
All I've been able to get to work so far is when an entry is made in ("E10:E19"), but I'm not sure how to include the other column in the range, or how to get it to react to a "ClearContents" in any part of the range.
Can someone provide me some direction? Here's the code I've developed so far:
I have a sheet on which I would like to cause a YesNo MsgBox to open whenever an entry (or deletion) is made in the following range:
Range("E10:E19,L10,L19")
All I've been able to get to work so far is when an entry is made in ("E10:E19"), but I'm not sure how to include the other column in the range, or how to get it to react to a "ClearContents" in any part of the range.
Can someone provide me some direction? Here's the code I've developed so far:
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column <> 5 Then Exit Sub
Dim YesNo As Integer
YesNo = MsgBox("Would you like to include these initials in the selection list on the ::Patient Visits"" sheet?", 36, "INCLUDE INITIALS ON LIST?")
Select Case YesNo
Case vbYes
Application.EnableEvents = False
Application.Run "sort_stuff"
Application.EnableEvents = True
Case vbNo
Exit Sub
End Select
End Sub