Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User selection of folder and open all .xls files within folder | Excel Programming | |||
Help: Can open a spreadsheet in a folder which contains spaces in the folder name! | Excel Programming | |||
open file from folder save in new folder | Excel Programming | |||
control of dialog macro dialog box. on open | Excel Programming | |||
File folder dialog | Excel Programming |