Sub Folder_select() Dim iNull As Integer, lpIDList As Long, lResult As Long 'Dim sPath As String, udtBI As BrowseInfo Dim udtBI As BrowseInfo With udtBI 'Set the owner window '.hWndOwner = Me.hWnd 'lstrcat appends the two strings and returns the memory address .lpszTitle = lstrcat("C:\", "") 'Return only if the user selected a directory .ulFlags = BIF_USENEWUI '.ulFlags = &H1& (von Seite: http://www.vb-hellfire.de/knowlib/browsefolder.php) ' oder auch http://www.vbarchiv.net/vbapi/struct_BROWSEINFO.php End With 'Show the 'Browse for folder' dialog lpIDList = SHBrowseForFolder(udtBI) If lpIDList Then sPath = String$(MAX_PATH, 0) 'Get the path from the IDList SHGetPathFromIDList lpIDList, sPath 'free the block of memory CoTaskMemFree lpIDList iNull = InStr(sPath, vbNullChar) If iNull Then sPath = Left$(sPath, iNull - 1) End If End If sPath = sPath + "\" End Sub