Se ti va bene questo..............

Metti un pulsante nel form e chiamalo cmdBrowseDir

'------------taglia da quì-------------
Option Explicit

Private Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type

Private Type SHITEMID
cb As Long
abID As Byte
End Type

Private Type ITEMIDLIST
mkid As SHITEMID
End Type

Private Const BIF_RETURNONLYFSDIRS = &H1
Private Const BIF_DONTGOBELOWDOMAIN = &H2
Private Const BIF_STATUSTEXT = &H4
Private Const BIF_RETURNFSANCESTORS = &H8
Private Const BIF_BROWSEFORCOMPUTER = &H1000
Private Const BIF_BROWSEFORPRINTER = &H2000

Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As Long
Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" (ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As ITEMIDLIST) As Long
Private Declare Function SHBrowseForFolder Lib "shell32.dll" Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long



Private Function BrowseFolder(ByVal hwnd As Long, ByVal szDialogTitle As String) As String
Dim Esito As Long
Dim Bi As BROWSEINFO
Dim dwIList As Long
Dim szPath As String

Bi.hOwner = hwnd
Bi.lpszTitle = szDialogTitle
Bi.ulFlags = BIF_RETURNONLYFSDIRS
szPath = Space$(1024)
dwIList = SHBrowseForFolder(Bi)
Esito = SHGetPathFromIDList(ByVal dwIList, ByVal szPath)
If Esito Then
BrowseFolder = Left$(szPath, InStr(szPath, Chr(0)) - 1)
Else
BrowseFolder = ""
End If

End Function


Private Sub cmdBrowseDir_Click()
Dim DirSelected As String

DirSelected = BrowseFolder(Me.hwnd, "Seleziona" & Chr$(10) & "La cartella")
If DirSelected = "" Then Exit Sub
MsgBox DirSelected

End Sub

'---------a qui------------------------

ciao jab


link
homepage
http://%77%77%77%2e%74%77%6f%72%6b%2e%69%74/
software
http://%77%77%77%2e%74%77%6f%72%6b%2...programmi.html
forum
http://%77%77%77%2e%74%77%6f%72%6b%2...um/default.asp