title: Runtime Error 424 Object Required in Vb6
body: <p>I am new to Vb,</p>
  
  <p>i am getting error in my source code,</p>
  
  <p>here is my code snippet,</p>
  
  <pre><code>Dim a,b as integer 
    a=val (txtf.Text)
    b=val (txts.Text)
      if(a&gt;b)then
         txtr=a
      else
        txtr=b
     end if 
  end sub
  </code></pre>
  
  <p><strong><em>ERROR</em>: Runtime Error 424 Object Required:</strong></p>
  
  <p><strong>any help will be appriciated.</strong></p>