by Mike G (7 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 19th September 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Getting Multiple Files back from the CommonDialog Control
' ------------------------------------------------------------
' Copyright ©2001 Mike G --> IvbNET.COM
' All Rights Reserved, http://www.ivbnet.com
' EMAIL : [email protected]
' ------------------------------------------------------------
' You are free to use this code within your own applications,
' but you are forbidden from selling or distributing this
' source code without prior written consent.
' ------------------------------------------------------------
Private Sub cmdExit_Click()
Unload Me
End Sub
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