|
-
Nov 11th, 1999, 02:16 AM
#1
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
-
Nov 11th, 1999, 12:15 PM
#2
Junior Member
please, answer this question.
-
Nov 11th, 1999, 12:17 PM
#3
Hyperactive Member
Use the cdlOFNAllowMultiselect flag with the Common Dialog.
------------------
Tom Young, 14 Year Old
[email protected]
ICQ: 15743470
AIM: TomY10
PERL, JavaScript and VB Programmer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|