title: Adding file path to listbox item
body: <p>I'm trying to store the file path in a tag of a listbox item.</p>
  
  <p>I'm using the below to search through and add the desired folder name to the list box</p>
  
  <p>I've added the <code>ListBox1.Tag = sDir</code> line to above the first <code>Next</code> and when I step thorugh the code the value of <code>sDir</code> appears to hold the path however if I create a simple <code>Double click</code> event that pops up a message box with the file path in it only shows the first folder name in the list.</p>
  
  <p>Any tips or advice - I basically want to select a Listbox item and have it point to its path!</p>
  
  <p>Thanks </p>
  
  <pre><code> For Each Dir As String In System.IO.Directory.GetDirectories("c:\Working")
  
          Dim dirInfo As New System.IO.DirectoryInfo(Dir)
  
          For Each sDir As String In System.IO.Directory.GetDirectories(dirInfo.ToString)
  
              Dim sdirInfo As New System.IO.DirectoryInfo(sDir)
  
              ListBox1.Items.Add(sdirInfo.Name)
              ListBox1.Tag = sDir
          Next
  
      Next
  </code></pre>