MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Jun 24th, 2007, 05:02 AM   #1
SydneyGeek
MrExcel MVP
 
SydneyGeek's Avatar
 
Join Date: Aug 2003
Location: Sydney, Australia
Posts: 8,997
Default Application.FileSearch is gone in Excel 2007 -- Alternatives

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
SydneyGeek is offline   Reply With Quote
Old Jun 24th, 2007, 08:54 AM   #2
RichardSchollar
MrExcel MVP
Moderator
Contortionist
 
RichardSchollar's Avatar
 
Join Date: Apr 2005
Location: Hampshire, UK (Home); London, UK (Work)
Posts: 18,307
Default

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!



RichardSchollar is offline   Reply With Quote
Old Jun 24th, 2007, 01:26 PM   #3
SydneyGeek
MrExcel MVP
 
SydneyGeek's Avatar
 
Join Date: Aug 2003
Location: Sydney, Australia
Posts: 8,997
Default

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
SydneyGeek is offline   Reply With Quote
Old Jun 25th, 2007, 12:38 AM   #4
NateO
MrExcel MVP
Admin
 
NateO's Avatar
 
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,617
Default

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

__________________
Regards,
Nate Oliver
Microsoft Excel MVP
Nate's Excel Blog
NateO is offline   Reply With Quote
Old Jun 25th, 2007, 01:14 AM   #5
SydneyGeek
MrExcel MVP
 
SydneyGeek's Avatar
 
Join Date: Aug 2003
Location: Sydney, Australia
Posts: 8,997
Default

Thanks Nate



Denis
__________________
"I've only ever had two good ideas" -- Albert Einstein
-------------------------------------------------------
My site contains a number of Excel and Access Resources
SydneyGeek is offline   Reply With Quote
Old Jun 25th, 2007, 01:51 AM   #6
NateO
MrExcel MVP
Admin
 
NateO's Avatar
 
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,617
Default

You are welcome.
__________________
Regards,
Nate Oliver
Microsoft Excel MVP
Nate's Excel Blog
NateO is offline   Reply With Quote
Old Aug 13th, 2008, 07:38 PM   #7
iknowu99
 
iknowu99's Avatar
 
Join Date: Dec 2004
Location: PA
Posts: 860
Default Re: Application.FileSearch is gone in Excel 2007 -- Alternatives

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
iknowu99 is offline   Reply With Quote
Old Aug 13th, 2008, 07:43 PM   #8
iknowu99
 
iknowu99's Avatar
 
Join Date: Dec 2004
Location: PA
Posts: 860
Post Re: Application.FileSearch is gone in Excel 2007 -- Alternatives

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
iknowu99 is offline   Reply With Quote
Old Sep 10th, 2008, 10:41 AM   #9
tr03bor
 
Join Date: Mar 2008
Posts: 64
Default Re: Application.FileSearch is gone in Excel 2007 -- Alternatives

Quote:
Originally Posted by iknowu99 View Post
i am slowly adopting the function from ozgrid's: http://www.ozgrid.com/forum/showpost...73&postcount=4

but what about subfolders??
yep, what about subfolders? I need a code for this too!
tr03bor is offline   Reply With Quote
Old Nov 17th, 2008, 03:44 AM   #10
SydneyGeek
MrExcel MVP
 
SydneyGeek's Avatar
 
Join Date: Aug 2003
Location: Sydney, Australia
Posts: 8,997
Default Re: Application.FileSearch is gone in Excel 2007 -- Alternatives

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
SydneyGeek is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 03:51 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.