I know some stuff no longer works in newer versions of excel.
I'm having trouble trying to figure out how to get this script to work again.
This script opens all .xls files in a specified directory.
Any ideas how to modify it so it works again?
Thanks for taking a look!
I'm having trouble trying to figure out how to get this script to work again.
This script opens all .xls files in a specified directory.
Code:
Sub new2010find()
'MyDir = ActiveWorkbook.Path ' current path"
strPath = mydir & "P:\CPD\Stats\data" ' files subdir
With Application.FileSearch
.NewSearch
.LookIn = strPath
.SearchSubFolders = False
.Filename = ".xls"
If .Execute > 0 Then
For Each vaFileName In .FoundFiles
ProgressBar1.Value = cas
Workbooks.Open vaFileName, , True
cas = cas + 1
Next
End If
End With
End Sub
Any ideas how to modify it so it works again?
Thanks for taking a look!