Get ValueMember of Selected item in ListBox
I've seen a couple of posts asking a similar question but I have not been able to duplicate the answers in my code successfully. The following code adds items and their value member to a list box. Public Shared Sub ListFiles(hTab As Hashtable) Debug.Print("create file and key" & Now) Dim Enumerator As IDictionaryEnumerator Enumerator = hTab.GetEnumerator() Dim MyKeys As ICollection Dim Key As Object MyKeys = hTab.Keys() If (hTab.Count > 0) Then For Each Key In MyKeys Dim sfileName As String = hTab(Key) Dim first As Integer = sfileName.IndexOf("_") Dim last As Integer = sfileName.LastIndexOfAny