I found a solution to this - in case anybody else is needing to do the same:
"mafandon" wrote:
> Could you provide me an example of how to populate the combobox with only
> filenames and NOT the entire path w/ filenames? Thank you again.
>
> "Cor Ligthert [MVP]" wrote:
>
> > Mafandon,
> >
> > I use the Path Class to get parts of paths.
> >
> >
http://msdn2.microsoft.com/en-us/library/system.io.path.aspx > >
> > I hope this helps,
> >
> > Cor
> >
> > "mafandon" <mafandon@discussions.microsoft.com> schreef in bericht
> > news:DF5E2EC8-C83F-4B7C-9556-A58495861104@microsoft.com...
> > > My code returns the list of files in the directory I desire, but it
> > > displays
> > > the entire path to the file and the file name. I can msgbox the desired
> > > result (just the file name), but I believe the readonlycollection has
> > > something to do with this...
> > >
> > > Dim numofchars As Integer = (memberpath & "\" &
> > > Me.EmpMemberNoTextBox.Text).ToString.Length + 1
> > > Dim filelist As
> > > System.Collections.ObjectModel.ReadOnlyCollection(Of String)
> > > filelist = My.Computer.FileSystem.GetFiles(memberpath & "\"
> > > & Me.EmpMemberNoTextBox.Text, FileIO.SearchOption.SearchTopLevelOnly)
> > > For Each foundfile As String In filelist
> > > Dim lengthofpath As Integer =
> > > (foundfile).Length.ToString
> > > Dim filenamelength As Integer = lengthofpath -
> > > numofchars
> > > Dim filename As String =
> > > Microsoft.VisualBasic.Right(foundfile, filenamelength)
> > > Me.ComboBxMemberFiles.Items.Add(filename.ToString)
> > > Next
> > >
> > > How can I display just the filename in the combo box?
> > >
> > > Thank you!
> >
> >