Compwiz is right. Next example will store all selected files in array (arrFileNames):


Code:
    Dim strText As String
    Dim arrFileNames() As String
    Dim strBuffer As String
    Dim strDir As String
    Dim i As Integer

    With CommonDialog1
        .Flags = cdlOFNAllowMultiselect Or cdlOFNExplorer
        .ShowOpen
        strText = .FileName
    End With
    
    strDir = Left(strText, InStr(strText, vbNullChar) - 1) & "\"
    strText = Mid(strText, InStr(strText, vbNullChar) + 1)
    
    Do Until strText = ""
        ReDim Preserve arrFileNames(i)
        If InStr(strText, vbNullChar) Then
            arrFileNames(i) = strDir & Left(strText, InStr(strText, vbNullChar) - 1)
            strText = Mid(strText, InStr(strText, vbNullChar) + 1)
        Else
            If strText <> "" Then
                arrFileNames(i) = strDir & strText
                strText = ""
            End If
        End If
        i = i + 1
    Loop

arrFileNames now has all files stored as elements.


Regards,

------------------

Serge

Software Developer
[email protected]
[email protected]
ICQ#: 51055819