title: How to set a textbox input length
body: <p>Using VB6</p>
  
  <p>using Textbox in my form.</p>
  
  <p>I want to limit the Input in the textbox, so maximum value should be 6.<br>
  User should enter up to six chars otherwise it should show error message</p>
  
  <pre><code>Button1.click
  
  if Length(textbox1.text) &gt; 6 then
    enter only six chars
  else if Length(textbox1.text) &lt; 6 then
    enter up to six chars
  </code></pre>
  
  <p>How do I make the code for the above condition.</p>