Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Open Folder dialog box

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Open Folder dialog box

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Open Folder dialog box


See 'Browse For Folder'
(http://www.cpearson.com/excel/BrowseFolder.aspx)


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=52892

  #4   Report Post  
Posted to microsoft.public.excel.programming
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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hi BradTry this for a folderIf you want to select files then postbackSub

Thank you very much

It's very useful ^^

On Wednesday, January 21, 2009 10:41 AM Bra wrote:


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



On Wednesday, January 21, 2009 10:50 AM 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 ...



On Wednesday, January 21, 2009 10:51 AM royUK wrote:


See 'Browse For Folder'
(http://www.cpearson.com/excel/BrowseFolder.aspx)


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site' (http://www.excel-it.com/)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=52892



On Wednesday, January 21, 2009 11:11 AM Bra wrote:


Perfect,

Thanks so much.

Brad

"Ron de Bruin" wrote:



Submitted via EggHeadCafe
ASP.NET Drawing a chart using OWC11 - Office Web Components
http://www.eggheadcafe.com/tutorials...omponents.aspx

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
User selection of folder and open all .xls files within folder Barb Reinhardt Excel Programming 4 April 14th 07 01:41 PM
Help: Can open a spreadsheet in a folder which contains spaces in the folder name! 1tsols Excel Programming 17 July 31st 06 04:26 PM
open file from folder save in new folder tim64[_3_] Excel Programming 20 June 17th 05 07:58 PM
control of dialog macro dialog box. on open Gerry Abbott Excel Programming 0 July 22nd 04 05:41 PM
File folder dialog Mike[_61_] Excel Programming 9 October 31st 03 11:34 PM


All times are GMT +1. The time now is 01:21 AM.

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"