title: Excel-VBA ListBox Item to String function
body: <p>I have a Userform which allows user to transfer item from <code>ListBox1</code> to <code>ListBox2</code>. </p>
  
  <p><strong>The items in <code>ListBox2</code> are supposed to be filenames of excel files which are to be imported.</strong></p>
  
  <p>I have an overall idea of how this can operate but I am stuck with the problem that I cannot open the file with the item name in <code>ListBox2</code>.</p>
  
  <p>My question is, is it possible to "convert" the item name in a <code>Listbox</code> to a string so it can be used as the filename for file opening?</p>
  
  <p>I tried to use the MsgBox to test if the <code>Listbox2(i) / ListBox2.Name(i) / ListBox2.List(i)</code> argument returns any values but unfortunately it doesn't. It always shows blank.</p>
  
  <pre><code>'This is the part where I try to open the files indicated in ListBox2
  Dim directory = "my directory is here"
  
  For i = 0 To ListBox2.ListCount - 1
  
          Application.Workbooks.Open Filename:= directory &amp; "\" &amp; "FinalExcel.xlsx" 'This one is for testing to open file and it works.
          Application.Workbooks.Open Filename:= directory &amp; "\" &amp; ListBox2(i)
  
  Next
  </code></pre>