title: vba listbox to connect with excel
body: <p>I am getting an error on below line.</p>
  
  <pre><code>ListBox1.RowSource = "Tabelle1!A2:C" &amp; loletzte
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>myFileNameDir3 = Sheet3.Range("V10").Value &amp; TextBox116.Text &amp; ".xlsx"
  
  Workbooks.Open fileName:=myFileNameDir3, UpdateLinks:=0
  Set ws3 = Worksheets("Sheet1")
  
  With ListBox5
          .ColumnCount = 3
          .ColumnWidths = "1cm;2cm;2cm"
          .ColumnHeads = True
      ListBox5.RowSource = ws1.Range("A1").CurrentRegion
      'oder:
      'ListBox1.RowSource = "Tabelle1!A2:C" &amp; loletzte
  End With
  </code></pre>