Abulafia
Board Regular
- Joined
- Jun 15, 2004
- Messages
- 66
I have a column with validation. It is a list of three options. As many can be picked but the choices are limited to only two of the three so it can be like this.
Person#1: Option1
Person#2: Option2
Person#3: Option1
But this would cause an "error"
Person#1: Option1
Person#2: Option2
Person#3: Option3
The range xs is a count if which ones appear. If xs = 3 then there is a violation
Unfortunately when I run the code, nothing happens. The message box appears though.
And I've tried Application.Undo too.
Person#1: Option1
Person#2: Option2
Person#3: Option1
But this would cause an "error"
Person#1: Option1
Person#2: Option2
Person#3: Option3
The range xs is a count if which ones appear. If xs = 3 then there is a violation
Code:
If Range("xs") > 2 Then
ActiveCell = ""
' If so, display an error message
MsgBox Range(nrMessage2), vbExclamation, Range(nrTitle2)
End If
Unfortunately when I run the code, nothing happens. The message box appears though.
And I've tried Application.Undo too.