Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Visual Basic >> Snippet

Common dialog - multiple files from common dialog


Private Sub cmdOpen_Click()
    Dim sFileNames() As String
    Dim iCount As Integer

   cd.Filter = "All Files|*.*"
   cd.Flags = cdlOFNAllowMultiselect
   cd.ShowOpen

    If cd.FileName <> "" Then
       sFileNames = Split(cd.FileName, Chr (32))
        For iCount = Lbound (sFileNames) To Ubound (sFileNames)
           MsgBox sFileNames(iCount), vbInformation
        Next

    End If
End Sub