![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Aug 2003
Location: Sydney, Australia
Posts: 8,997
|
For those who use Application.FileSearch in Excel and Access, it's a huge pain that the object has been hidden in Office 2007.
I spent some time looking around for alternatives and have found two so far. 1. A FileSearch class that you can add to your project. Instead of using Application.FileSearch, you reference FileSearch instead 2. You can also use VBScript. Has anyone else come up with a useful method that they can share with the Board? Denis
__________________
"I've only ever had two good ideas" -- Albert Einstein ------------------------------------------------------- My site contains a number of Excel and Access Resources |
|
|
|
|
|
#2 |
|
MrExcel MVP
Moderator Contortionist Join Date: Apr 2005
Location: Hampshire, UK (Home); London, UK (Work)
Posts: 18,307
|
Hi Denis
Along the lines of what Andrew suggested, this is a function using Dir that I posted at - shock horror! - Ozgrid: http://www.ozgrid.com/forum/showpost...73&postcount=4
__________________
Richard Schollar Microsoft MVP - Excel Need to post some data? PM me with your email address for the Beta version of the Board html maker! |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Aug 2003
Location: Sydney, Australia
Posts: 8,997
|
Thanks Richard,
Good to have as many options as possible when you want to solve a problem. Why the functionality was removed in the first place beats me... Denis
__________________
"I've only ever had two good ideas" -- Albert Einstein ------------------------------------------------------- My site contains a number of Excel and Access Resources |
|
|
|
|
|
#4 |
|
MrExcel MVP
Admin Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,617
|
Not sure why it was removed, might be because it was buggy...?
Here's something I came up with: http://www.mrexcel.com/board2/viewto...253882#1253882 |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Aug 2003
Location: Sydney, Australia
Posts: 8,997
|
Thanks Nate
Denis
__________________
"I've only ever had two good ideas" -- Albert Einstein ------------------------------------------------------- My site contains a number of Excel and Access Resources |
|
|
|
|
|
#6 |
|
MrExcel MVP
Admin Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,617
|
You are welcome.
|
|
|
|
|
|
#7 |
|
Join Date: Dec 2004
Location: PA
Posts: 860
|
Hi People
I have been using this function extensively. Most my macros include the Application.FileSearch method. Perhaps there is a way to automatically update? Maybe add References? Thanks!
__________________
Hence, we fail to reject the null hypothesis that there is no relationship |
|
|
|
|
|
#8 |
|
Join Date: Dec 2004
Location: PA
Posts: 860
|
i am slowly adopting the function from ozgrid's: http://www.ozgrid.com/forum/showpost...73&postcount=4
but what about subfolders??
__________________
Hence, we fail to reject the null hypothesis that there is no relationship |
|
|
|
|
|
#9 | |
|
Join Date: Mar 2008
Posts: 64
|
Quote:
|
|
|
|
|
|
|
#10 |
|
MrExcel MVP
Join Date: Aug 2003
Location: Sydney, Australia
Posts: 8,997
|
Take a look at Nate's code on this page. It handles subfolders too.
Denis
__________________
"I've only ever had two good ideas" -- Albert Einstein ------------------------------------------------------- My site contains a number of Excel and Access Resources |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|