check this line:-
Set wbSource = Workbooks.Open("C:\user\destop\fileA.xlsx")
user\destop? user\tatfish\desktop
See if this opens your file NB the :-
Sub Macro1()
Dim fso, fsoFolder, fsoFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set fsoFolder = fso.GetFolder(ActiveWorkbook.Path)
' replace with, if macro not in same folder " Set fsoFolder =Workbooks.Open("C:\user\tatfish\desktop"
For Each fsoFile In fsoFolder.Files
strname = fsoFile.Name
If Left(strname, 6) = "fileA." Or Right(strname, 5) = ".xlsx" Then
Workbooks.Open Filename:=ActiveWorkbook.Path & "\" & strname
'ActiveWindow.Close False
End If
Next
200 ' Exit
End Sub
Bookmarks