title: checking data type in VBA
body: <p>I have a program in VBA in which I'd like the user to only enter a number.  I want to be able to catch when they they enter a string and have them try again.  This is what I've tried:</p>
  
  <pre><code>Sub getInterest()
      annualInterest = InputBox("Please enter your annual interest rate as a decimal. ")
          If TypeOf annualInterest Is Double Then
              'Continue with program
          Else
              Call getInterest()  
          End If
  End Sub
  </code></pre>
  
  <p>But this doesn't work.</p>