C
Cavy
Hi there,
I am trying to include a Cancel option in a Worksheet_Change event, but I am
having this error message when including the Cancel in the routine:
“Compile Error. Procedure declaration does not match description of even or
procedure having the same nameâ€
My code is as follows:
Private Sub Worksheet_Change(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, Range("XInput")) Is Nothing Then
Else
ReConfigure = MsgBox("You have selected to change X Input" & Chr(10)
& "Pricing needs to be re - calculated" & Chr(10) & "Do you want to
proceed?", vbYesNo)
If ReConfigure = vbNo Then Cancel = True
End If
End sub
Could you please advice?
Thanks
I am trying to include a Cancel option in a Worksheet_Change event, but I am
having this error message when including the Cancel in the routine:
“Compile Error. Procedure declaration does not match description of even or
procedure having the same nameâ€
My code is as follows:
Private Sub Worksheet_Change(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, Range("XInput")) Is Nothing Then
Else
ReConfigure = MsgBox("You have selected to change X Input" & Chr(10)
& "Pricing needs to be re - calculated" & Chr(10) & "Do you want to
proceed?", vbYesNo)
If ReConfigure = vbNo Then Cancel = True
End If
End sub
Could you please advice?
Thanks