Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
al al is offline
external usenet poster
 
Posts: 363
Default Built-in Dialog box for folders?

Is there a built-in Dialog box that lets you select a folder, similar to the
way xlDialogOpen lets you select a file?
--
Al C
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Built-in Dialog box for folders?

Try this

Dim oApp As Object
Dim oFolder

Set oApp = CreateObject("Shell.Application")

'Browse to the folder
Set oFolder = oApp.BrowseForFolder(0, "Select folder", 512)
If Not oFolder Is Nothing Then
'Do your stuff
Else
MsgBox "You not select a folder"
End If


--

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


"Al" wrote in message ...
Is there a built-in Dialog box that lets you select a folder, similar to the
way xlDialogOpen lets you select a file?
--
Al C

  #3   Report Post  
Posted to microsoft.public.excel.programming
al al is offline
external usenet poster
 
Posts: 363
Default Built-in Dialog box for folders?

Perfect!

Thank you, Ron.
--
Al C


"Ron de Bruin" wrote:

Try this

Dim oApp As Object
Dim oFolder

Set oApp = CreateObject("Shell.Application")

'Browse to the folder
Set oFolder = oApp.BrowseForFolder(0, "Select folder", 512)
If Not oFolder Is Nothing Then
'Do your stuff
Else
MsgBox "You not select a folder"
End If


--

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


"Al" wrote in message ...
Is there a built-in Dialog box that lets you select a folder, similar to the
way xlDialogOpen lets you select a file?
--
Al C


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Built-in Dialog box for folders?

Mr Ron,
How to return the selected folder path to cell A1
as a text value.

Thank's,
Rgds,

Shiro


"Ron de Bruin" wrote in message
...
Try this

Dim oApp As Object
Dim oFolder

Set oApp = CreateObject("Shell.Application")

'Browse to the folder
Set oFolder = oApp.BrowseForFolder(0, "Select folder", 512)
If Not oFolder Is Nothing Then
'Do your stuff
Else
MsgBox "You not select a folder"
End If


--

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


"Al" wrote in message

...
Is there a built-in Dialog box that lets you select a folder, similar to

the
way xlDialogOpen lets you select a file?
--
Al C



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Built-in Dialog box for folders?

Hi Shiro

Try

Sub test()
Dim oApp As Object
Dim oFolder

Set oApp = CreateObject("Shell.Application")

'Browse to the folder
Set oFolder = oApp.BrowseForFolder(0, "Select folder", 512)
If Not oFolder Is Nothing Then
Range("A1").Value = oFolder.Self.Path
Else
MsgBox "You not select a folder"
End If
End Sub


--

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


"shiro" wrote in message ...
Mr Ron,
How to return the selected folder path to cell A1
as a text value.

Thank's,
Rgds,

Shiro


"Ron de Bruin" wrote in message
...
Try this

Dim oApp As Object
Dim oFolder

Set oApp = CreateObject("Shell.Application")

'Browse to the folder
Set oFolder = oApp.BrowseForFolder(0, "Select folder", 512)
If Not oFolder Is Nothing Then
'Do your stuff
Else
MsgBox "You not select a folder"
End If


--

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


"Al" wrote in message

...
Is there a built-in Dialog box that lets you select a folder, similar to

the
way xlDialogOpen lets you select a file?
--
Al C



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Built-in Dialog Box Argument Button Paula Excel Discussion (Misc queries) 0 March 30th 07 08:40 PM
Find/Replace built-in dialog in XP kevboy Excel Programming 2 December 19th 05 08:59 PM
Re : Making use of the Built-in Dialog Boxes TKT-Tang Excel Programming 3 December 9th 03 08:33 AM
Getting a file name using a built in dialog box Steven Revell Excel Programming 1 November 18th 03 01:14 PM
Built-in file dialog question MacroMan Excel Programming 1 August 7th 03 11:53 PM


All times are GMT +1. The time now is 06:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"