 <p>It's because your using an OR clause, you need to use AND. Basically your saying if the textSample is not D then show your message box.</p> <p>Change it to:</p> <pre><code>Dim textSample as String = "F" If Not textSample = "D" AND Not textSample = "E" AND Not textSample = "F" Then MessageBox.Show("False") End If </code></pre> <p>That should work.</p>