- Dec 13, 2017
- Reaction score
I have code that runs when range "B:B" changes. However, when there is any change on the worksheet, it runs. I am trying to limit it to "B:B". Here is the code:
Any ideas, how I can have it run only on range "B:B"?
Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) 'Reminds the yser to enter the carryover name into the current FY listing. Dim MsgBoxResult As Long MsgBoxResult = MsgBox("Is the Veteran a carryover from last year? " & vbCr, _ vbYesNo, "Vocational Services - OVR " & ActiveSheet.Name) If MsgBoxResult = vbNo Then Exit Sub ElseIf MsgBoxResult = vbYes Then If WorksheetFunction.CountA(Range("B:B")) <> 0 Then MsgBox " Check to verify Veteran data is entered in FY ## Referrals" & vbCr & _ " It's critical that Carryover data is captured. " & vbCr & _ "" & vbCr & _ " Please enter the name in walk in list if not on either last " & vbCr & _ " year's or this year's consult list! " & vbCr & _ "" & vbCr & _ " Enter veteran as a walk in, if there was a consult from last year and " & vbCr & _ " enter the SC percent" & vbCr & _ "" & vbCr & _ " You have entered " & Cells(Target.Row, 2) & " in cell " & Target.Address, vbInformation, "Vocational Services - OVR" & ActiveSheet.Name Call Referals 'Calls Referrals folder. Else Exit Sub End If End Sub