From: Otto Moehrbach on 18 May 2010 13:10 Excel 2003-2007 An OP posted a problem and I realized that there was one thing I needed to know before I could help him. What is the code to allow the user to select a folder? The result must be the full path to that folder. Note: That path will not be the path to ThisWorkbook. Thanks for your time. Otto
From: Ron de Bruin on 18 May 2010 13:26 See a example in the macro on this page http://www.rondebruin.nl/csv.htm 'Browse to the folder with CSV files Set oApp = CreateObject("Shell.Application") Set oFolder = oApp.BrowseForFolder(0, "Select folder with CSV files", 512) If Not oFolder Is Nothing Then foldername = oFolder.Self.Path If Right(foldername, 1) <> "\" Then foldername = foldername & "\" End If -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Otto Moehrbach" <moehrbachoextra(a)bellsouth.net> wrote in message news:ePriD0q9KHA.5808(a)TK2MSFTNGP02.phx.gbl... > Excel 2003-2007 > An OP posted a problem and I realized that there was one thing I needed to > know before I could help him. What is the code to allow the user to select > a folder? The result must be the full path to that folder. Note: That > path will not be the path to ThisWorkbook. Thanks for your time. Otto >
From: Chip Pearson on 18 May 2010 14:58 I have code and a downloadable module at http://www.cpearson.com/excel/BrowseFolder.aspx that displays the standard Windows Browse Folder dialog. Cordially, Chip Pearson Microsoft Most Valuable Professional, Excel, 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com On Tue, 18 May 2010 13:10:27 -0400, "Otto Moehrbach" <moehrbachoextra(a)bellsouth.net> wrote: >Excel 2003-2007 >An OP posted a problem and I realized that there was one thing I needed to >know before I could help him. What is the code to allow the user to select >a folder? The result must be the full path to that folder. Note: That >path will not be the path to ThisWorkbook. Thanks for your time. Otto
From: Otto Moehrbach on 18 May 2010 16:38 Thanks guys. Otto "Chip Pearson" <chip(a)cpearson.com> wrote in message news:hoo5v59mqfaqka01o9v5vg8ss18rk2ngr5(a)4ax.com... > I have code and a downloadable module at > http://www.cpearson.com/excel/BrowseFolder.aspx that displays the > standard Windows Browse Folder dialog. > > Cordially, > Chip Pearson > Microsoft Most Valuable Professional, > Excel, 1998 - 2010 > Pearson Software Consulting, LLC > www.cpearson.com > > > > On Tue, 18 May 2010 13:10:27 -0400, "Otto Moehrbach" > <moehrbachoextra(a)bellsouth.net> wrote: > >>Excel 2003-2007 >>An OP posted a problem and I realized that there was one thing I needed to >>know before I could help him. What is the code to allow the user to >>select >>a folder? The result must be the full path to that folder. Note: That >>path will not be the path to ThisWorkbook. Thanks for your time. Otto
|
Pages: 1 Prev: USE THE "IF" STATEMENT IN EXCEL Next: Lost horizontal scroll bar |