title: Conversion from string "" to type 'Integer' is not valid. - VB.NET
body: <p>When I click cancel button of the input box it shows this 'Conversion from string "" to type 'Integer' is not valid.' error in vb.net 2010. My code is,</p>
  
  <pre><code>Dim lineNo As Integer
  
  lineNo = InputBox("What is the last record number?" &amp; 
  vbNewLine &amp; vbNewLine &amp; "Enter line number 0 - 30.", "Enter Line Number", 0)
  </code></pre>
  
  <p>What's the wrong in here?</p>
  
  <p>Update:     Dim lineNo As Integer. I have forgotten to state the declaration here.</p>