This code is supposed to open a specific file, in this case an MP3 file but then show it in a list box. But it isn't working!!
Private Sub btnAddFile_Clic k(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btnAddFile.Clic k
Dim OpenFile As New OpenFileDialog
Dim file As String
OpenFile.Initia lDirectory = "C:\Documen ts and Settings\Matth\ My Documents\test1 \"
OpenFile.Filter = "MP3 Files (*.mp3)|*.MP3"
OpenFile.Filter Index = 1
OpenFile.Restor eDirectory = True
OpenFile.Multis elect = True
If OpenFile.ShowDi alog() = Windows.Forms.D ialogResult.OK Then
For Each file In OpenFile.FileNa mes
ListBox.Items.A dd(file)
Next
End
End If
Could someone help me with this problem please??
Private Sub btnAddFile_Clic k(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btnAddFile.Clic k
Dim OpenFile As New OpenFileDialog
Dim file As String
OpenFile.Initia lDirectory = "C:\Documen ts and Settings\Matth\ My Documents\test1 \"
OpenFile.Filter = "MP3 Files (*.mp3)|*.MP3"
OpenFile.Filter Index = 1
OpenFile.Restor eDirectory = True
OpenFile.Multis elect = True
If OpenFile.ShowDi alog() = Windows.Forms.D ialogResult.OK Then
For Each file In OpenFile.FileNa mes
ListBox.Items.A dd(file)
Next
End
End If
Could someone help me with this problem please??
Comment