title: Prevent entering a string as an integer in VB
body: <p>Ok, so I really have no idea how to do this, but how would I prevent a crash when it asks for an integer value and the user gives it a string? </p>
  
  <p>Here's some example code;</p>
  
  <pre><code>private sub userInput()
      dim userInputNum As Integer
      userInputNum = InputBox("Enter a number.")
  end sub
  </code></pre>
  
  <p>And if the user enters text, it just crashes. So I was wondering if anyone had a solution?</p>
  
  <p>Thanks, I would appreciate it a lot.</p>