Yes it was Excel 2002 and not Excel 2000
You have got a good reply to this.... here is perhaps another
way to get this .... less intimidating
Sub BrowseForFolder_Shell()
'//Minimum DLL version shell32.dll version 4.71 or later
'//Minimum operating systems Windows 2000, Windows NT 4.0 with
Internet Explorer 4.0,
'//Windows 98, Windows 95 with Internet Explorer 4.0
Dim objShell As Object
Dim objFolder As Object
Dim strFolderFullPath As String
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder(0, "Please select a folder",
0, "C:\")
If (Not objFolder Is Nothing) Then
'// NB: If SpecFolder= 0 = Desktop then ....
On Error Resume Next
If IsError(objFolder.Items.Item.path) Then strFolderFullPath =
CStr(objFolder): GoTo GotIt
On Error GoTo 0
'// Is it the Root Dir?...if so change
If Len(objFolder.Items.Item.path) > 3 Then
strFolderFullPath = objFolder.Items.Item.path &
Application.PathSeparator
Else
strFolderFullPath = objFolder.Items.Item.path
End If
Else
MsgBox "User cancelled": GoTo Xit
End If
GotIt:
MsgBox "You selected:= " & strFolderFullPath, vbInformation,
"ObjectFolder:= " & objFolder
Xit:
Set objFolder = Nothing
Set objShell = Nothing
End Sub