title: Type mismatch error in VBA when adding data to textbox
body: <p>I have a <code>TextBox</code> and a <code>ListBox</code> with a list of various cities being populated from an Excel file </p>
  
  <p>Now each city has one of two options: either within territory or outside. I want that option to be shown in <strong><code>textBox</code></strong></p>
  
  <p>I tried something like this :</p>
  
  <pre><code>Private Sub CommandButton1_Click()
  
  TextBox2.Value = Application.VLookup(Me.ListBox1.Text,Sheets("Sheet1").Range("B:C"), 2, False)
  
  End Sub
  </code></pre>
  
  <p>But am getting error stating that :</p>
  
  <blockquote>
    <p>Run Time Error 2147352571 (80020005) . Could not set Value property. Type mismatch. </p>
  </blockquote>
  
  <p>My excel file is something like this :</p>
  
  <p><img src="https://i.stack.imgur.com/klIJP.png" alt="enter image description here"></p>