PC Review


Reply
Thread Tools Rate Thread

Built-in Dialog box for folders?

 
 
Al
Guest
Posts: n/a
 
      5th May 2008
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 With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      5th May 2008
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" <(E-Mail Removed)> wrote in message news:651F3A56-92BB-4B8E-920D-(E-Mail Removed)...
> 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 With Quote
 
Al
Guest
Posts: n/a
 
      5th May 2008
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" <(E-Mail Removed)> wrote in message news:651F3A56-92BB-4B8E-920D-(E-Mail Removed)...
> > 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 With Quote
 
shiro
Guest
Posts: n/a
 
      6th Jun 2008
Mr Ron,
How to return the selected folder path to cell A1
as a text value.

Thank's,
Rgds,

Shiro


"Ron de Bruin" <(E-Mail Removed)> wrote in message
news:O0#x#(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message

news:651F3A56-92BB-4B8E-920D-(E-Mail Removed)...
> > 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 With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      6th Jun 2008
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" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Mr Ron,
> How to return the selected folder path to cell A1
> as a text value.
>
> Thank's,
> Rgds,
>
> Shiro
>
>
> "Ron de Bruin" <(E-Mail Removed)> wrote in message
> news:O0#x#(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message

> news:651F3A56-92BB-4B8E-920D-(E-Mail Removed)...
>> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
display built-in dialog box using VBA Pranav Vaidya Microsoft Powerpoint 0 4th Sep 2008 11:26 AM
Does anyone know of any software like the built in Windows XP CD burning folders that will work with normal folders? AlexV Windows XP General 0 1st Jul 2004 12:10 PM
Built-in Dialog Boxes Lynn Taylor Microsoft Powerpoint 3 29th Apr 2004 04:24 PM
Getting a file name using a built in dialog box Steven Revell Microsoft Excel Programming 1 18th Nov 2003 01:14 PM
how can i use built-in dialog icons in a custom dialog form? K. Shier Microsoft Dot NET Framework Forms 0 12th Aug 2003 08:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:55 AM.