View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Brad Brad is offline
external usenet poster
 
Posts: 846
Default Open Folder dialog box

Perfect,

Thanks so much.

Brad

"Ron de Bruin" wrote:

Hi Brad

Try this for a folder
If you want to select files then post back

Sub test()
Dim oApp As Object
Dim oFolder As Variant

Set oApp = CreateObject("Shell.Application")

'Browse to the folder
Set oFolder = oApp.BrowseForFolder(0, "Select folder", 512)
If Not oFolder Is Nothing Then
MsgBox "You select this folder : " & oFolder.Self.Path
End If

End Sub



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Brad" wrote in message ...
Thanks for taking the time to read my question.

I would like to run some code that asks the user to selet the folder to look
in, and the standard dialog box opens that shows the file system on the PC.
I've done this before but can't find me code!!!

Any help would be great,

Thanks,

Brad