How to open Files that was loaded into a Listbox without extentions.

  • Thread starter Thread starter VB Novice Hendri
  • Start date Start date
V

VB Novice Hendri

Guest
How do I go aboute opening an Files that was loaded into a Listbox without extentions. Below is the code I use to load the File Names.

For Each file As String In Files
If Not Path.GetFileName(file).Contains("TEMPLATE") Then
RecipeListBox.Items.Add(Path.GetFileNameWithoutExtension(file))
End If
Next
This is the code I am using to try open the Files, it gives me an error "can not find the file spesifide"

Private Sub RecipeListBox_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RecipeListBox.SelectedIndexChanged

Process.Start(IO.Path.Combine(RecipeFolder, Me.RecipeListBox.SelectedItem.ToString))

End Sub

Continue reading...
 

Similar threads

V
Replies
0
Views
143
VB Novice Hendri
V
V
Replies
0
Views
126
VB Novice Hendri
V
V
Replies
0
Views
89
VB Novice Hendri
V
Back
Top