To select a folder, you can use Shell Component and Automation.
Private shlShell As Shell32.Shell Private shlFolder As Shell32.Folder Private Const BIF_RETURNONLYFSDIRS = &H1 Private Sub Command1_Click() If shlShell Is Nothing Then Set shlShell = New Shell32.Shell End If Set shlFolder = shlShell.BrowseForFolder(Me.hWnd, "Select a Directory", BIF_RETURNONLYFSDIRS) If Not shlFolder Is Nothing Then MsgBox shlFolder.Title End If End Sub
You need to add a link to shell32.dll in your project. Use the Project / References ... menu and then select shell32.dll .
Or you can use the Windows API, as Twotymz suggests.
Robert Harvey
source share