Yes.. i need help w/ the Common Dialog. I wrote this code that allowed only one file at a time to be loaded into a llist box and be played in the media player.. then i searched a bit on the internet and i found this multiple file opener.. now.. i just need some help puting the write code together. Look at the first code i wrote.. then the second is the multiple file opener... Thanks for the help.. i canta wait to become active in this forum

First Code


VB Code:
  1. Private Sub Command1_Click()
  2. On Error Resume Next
  3. CommonDialog1.Filter = "Audio Files|*.wav;*.mid;*.mp3;mp2;*.mod|"
  4. CommonDialog1.Flags = cdlOFNHideReadOnly
  5. CommonDialog1.CancelError = True
  6. CommonDialog1.DialogTitle = "Choose an mediafile to open"
  7. CommonDialog1.FileName = ""
  8. CommonDialog1.ShowOpen
  9.  
  10. List1.AddItem CommonDialog1.FileName
  11. List1.ListIndex = List1.ListIndex + 1
  12. MediaPlayer1.FileName = CommonDialog1.FileName
  13. Label1.Caption = CommonDialog1.FileName
  14. End Sub



Second Code For multiple open

VB Code:
  1. Private Sub Command1_Click()
  2. Dim entries As Variant
  3. Dim dir_name As String
  4. Dim i As Integer
  5.  
  6.     On Error Resume Next
  7.     CommonDialog1.ShowOpen
  8.     If err.Number = cdlCancel Then
  9.         Exit Sub
  10.     ElseIf err.Number <> 0 Then
  11.         MsgBox "Error " & Format$(err.Number) & _
  12.             " selecting files." & vbCrLf & err.Description
  13.             Exit Sub
  14.     End If
  15.  
  16.     List1.Clear
  17.     entries = Split(CommonDialog1.FileName, vbNullChar)
  18.  
  19.     ' See if there is more than one file.
  20.     If UBound(entries, 1) = LBound(entries, 1) Then
  21.         ' There is only one file name.
  22.         List1.AddItem entries(LBound(entries, 1))
  23.     Else
  24.         ' Get the directory name.
  25.         dir_name = entries(LBound(entries, 1))
  26.         If Right$(dir_name, 1) <> "\" Then dir_name = dir_name & "\"
  27.  
  28.         ' Get the file names.
  29.         For i = LBound(entries, 1) + 1 To UBound(entries, 1)
  30.             List1.AddItem dir_name & entries(i)
  31.         Next i
  32.     End If
  33. End Sub

I want the multiple file opener and do the same thing the first code does.. if u can help thanks a bunch