BrowseForFolder
Norman,
Many thanks. Works well.
My mistake : I was using MyPath as the first argument to GetDirectory.
Using CurDir for the first argument resolved the issue.
Paul
-----------------------------------------------------------------------------------------------
On Fri, 23 Dec 2005 06:13:41 -0000, "Norman Jones"
wrote:
Hi PF,
Try:
'=============
Sub Tester02()
Dim MyPath As String
Dim SaveDriveDir As String
Dim RetStr As String, Flags As Long, DoCenter As Boolean
Flags = BIF_RETURNONLYFSDIRS
Flags = Flags + BIF_NEWDIALOGSTYLE
SaveDriveDir = CurDir
MyPath = "C:\Documents and Settings" '<<==== CHANGE
ChDrive MyPath
ChDir MyPath
RetStr = GetDirectory(CurDir, Flags, DoCenter, _
"Please select a location to store data files")
If RetStr < "" Then MsgBox RetStr
ChDrive SaveDriveDir
ChDir SaveDriveDir
End Sub
'<<=============
|