Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Browse to select a folder

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Browse to select a folder

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" wrote in message ...
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Browse to select a folder

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"
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Browse to select a folder

Thanks guys. Otto

"Chip Pearson" wrote in message
...
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"
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


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
Browse for folder - not selecting folder Trish Smith Excel Programming 3 September 18th 08 09:23 AM
Browse for folder - not selecting folder Dave Peterson Excel Programming 1 September 17th 08 11:16 PM
Browse for folder - not selecting folder Barb Reinhardt Excel Programming 0 September 17th 08 02:24 PM
Browse for folder Steph[_6_] Excel Programming 1 December 8th 05 04:53 PM
Browse for folder MD Excel Programming 1 July 13th 04 01:23 PM


All times are GMT +1. The time now is 11:41 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"