Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here you go Peter!
Attached is a workbook with the code to accomplish what you want. Jus run the "BrowseFolder" macro and you will be presented with a Window Explorer window which will allow you to select a directory of you choice. Once selected, click OK and the path to the directory you jus selected will be placed in the text box on the included form. The inf from this text box will then be used with a loop to populate a listbo on the same form with each of the filenames found within that specifi directory. After selecting one of the files from the list box an clicking the submit button, you will write the directory path, th selected filename, and the full file path to cells in columns A, B, an C of the worksheet. Just step through the code and make whateve changes you need. The original code which I obtained from a former co-worker was found o the internet and was originally developed as a stand-alone VB application. The original version of this project could only be use for obtaining the directory path but I modified the code so that i would also list each individual files within a specific directory. Th code was also modified by me so that it would work with Excel VBA. have been using this code with several Excel macros I have written an it works great!! The macro will crash if you run the applicatio straight from the provided link below so make sure to right click th link and save the workbook before running it. Good luck, I hope thi helps! :) Rolli Attachment filename: browse for folder.xls Download attachment: http://www.excelforum.com/attachment.php?postid=52136 -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I am trying to open a ".gz" file with a macro in Excel 2003. | Excel Discussion (Misc queries) | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Excel Discussion (Misc queries) | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Setting up and Configuration of Excel | |||
modify how files are displyed in the "file open" window | Excel Discussion (Misc queries) | |||
How to change the font of Display window of "Open File" | Excel Discussion (Misc queries) |