by Imran (2 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 25th September 2007
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Selecting a FOLDER in VB.
API Declarations
'Just copy and paste this code and don't forget to add 1 command button to form
Private shlShell As Shell32.Shell
Private shlFolder As Shell32.Folder
Private Const RETURNONLYFSDIR = &H1
Set shlShell = New Shell32.Shell
Set shlFolder = shlShell.BrowseForFolder(Me.hWnd, "Select a Folder.......", RETURNONLYDIR)
If Not shlFolder Is Nothing Then
MsgBox shlFolder.Self.Path
End If
End Sub