Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filesearch error in Excel
Hi, Can any one tell me how to enable a class in the object browser in VBA? Filesearch is listed there in the hidden objects but it isn't enabled. Is this possible, even though Microsoft took it out of Office 2007? Thanks, Brett *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filesearch error in Excel
This has been dropped in 2007.
see http://support.microsoft.com/kb/935402/en-us recommended use of the DIR() function or the FileSystemObject The FileSystemObject is part of the Microsoft Scrioting Runtime, so in the IDE set a reference to this (Tools/references) Its not so easy, but here's an example to give you something to play with OPTION EXPLICIT Sub MyFileSearch() Dim sfoFile As Scripting.File With New FileSystemObject For Each sfoFile In .GetFolder("C:\temp").Files With sfoFile If .Name Like "*.CSV" Then Debug.Print .Name, .Type End If End With Next End With End Sub "Brett Nykiforuk" wrote in message ... Hi, Can any one tell me how to enable a class in the object browser in VBA? Filesearch is listed there in the hidden objects but it isn't enabled. Is this possible, even though Microsoft took it out of Office 2007? Thanks, Brett *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filesearch error in Excel
apologies for a typo
Microsoft Scrioting Runtime should of course be Microsoft Scripting Runtime "Patrick Molloy" wrote in message ... This has been dropped in 2007. see http://support.microsoft.com/kb/935402/en-us recommended use of the DIR() function or the FileSystemObject The FileSystemObject is part of the Microsoft Scrioting Runtime, so in the IDE set a reference to this (Tools/references) Its not so easy, but here's an example to give you something to play with OPTION EXPLICIT Sub MyFileSearch() Dim sfoFile As Scripting.File With New FileSystemObject For Each sfoFile In .GetFolder("C:\temp").Files With sfoFile If .Name Like "*.CSV" Then Debug.Print .Name, .Type End If End With Next End With End Sub "Brett Nykiforuk" wrote in message ... Hi, Can any one tell me how to enable a class in the object browser in VBA? Filesearch is listed there in the hidden objects but it isn't enabled. Is this possible, even though Microsoft took it out of Office 2007? Thanks, Brett *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Application.FileSearch Error | Excel Programming | |||
application.filesearch error in excel 2007 | Excel Programming | |||
Filesearch error in Excel 2007 | Excel Programming | |||
FileSearch error 1004 | Excel Programming | |||
Filesearch 1004 error with XL 2003 | Excel Programming |