How to make a Text box only accept whole numbers? VB : <p>I am trying to make a Battle Simulation and I need to make it so that text boxes only display and accept whole numbers. i.e 1, 5, 268. I want is so that and decimals will be rounded to the nearest whole number. I may just be acting silly but I cant think of a solution that will run, here is what I have got so far:</p>

<pre><code>    If AttackerMP.Text = Decimal Then
        AttackerMP.Text = Integer
    End If
</code></pre>
