I just bought "Office VBA Macros you can use today" and wanted to try a macro: "Creating a list of files that reside in a directory".
I was disappointed to see that it choked at line 31: "With Application.FileSearch", with the error message: "Object doesnt' support this action".
I am a beginner with VBA and wonder if any one has a fix for this...
You can find the entire file and many others (I have not tryied yet ), in the section for the title of this book (a .zip file).
Here is the snipplet from the code that stops the macro.
'New FileSystemObject
Set FSO = CreateObject("Scripting.FileSystemObject")
With Application.FileSearch
.NewSearch
.LookIn = Folder
.SearchSubFolders = LookInSubFolders
.FileType = msoFileTypeAllFiles
.Execute
I was disappointed to see that it choked at line 31: "With Application.FileSearch", with the error message: "Object doesnt' support this action".
I am a beginner with VBA and wonder if any one has a fix for this...
You can find the entire file and many others (I have not tryied yet ), in the section for the title of this book (a .zip file).
Here is the snipplet from the code that stops the macro.
'New FileSystemObject
Set FSO = CreateObject("Scripting.FileSystemObject")
With Application.FileSearch
.NewSearch
.LookIn = Folder
.SearchSubFolders = LookInSubFolders
.FileType = msoFileTypeAllFiles
.Execute