-
I rewrote my macro, but I got "runtime error 445".
I think FileFind object may not be supported.. It's weird because I am using Excel 2004 version 11.2.5. Can someone tell me the cause of the problem?
Thank you!
[VBA]Sub test()
Dim i As Integer
Dim wbResults As Workbook
With Application.FileFind
.SearchPath = "My Computer:Users:lcw
esktop:excel"
.FileType = msoFileTypeExcelWorkbooks
.Filename = "*.xls"
.SearchSubFolders = False
.Execute
With .FoundFiles
Debug.Print "Count = " & .Count
If .Count > 0 Then
For i = 1 To .Count
Set wbResults = Workbooks.Open(Filename:=.Item(i), UpdateLinks:=0)
Sheets("US").Select
Rows("1:1").Select
Selection.Delete Shift:=xlUp
wbResults.Close SaveChanges:=True
Next i
End If
End With
End With
End Sub[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules