Hi all
I have code that searches files in a folder, and gives me the filenames in MsgBox.

Sub LoopThroughFiles()
Dim wkbk As Workbook
Dim filename As String


Dim MyObj As Object, MySource As Object, file As Variant
file = Dir("C:\Test\Projects\")
Do While (file <> "")
If InStr(file, "Forecast") > 0 Then
MsgBox file

End If
file = Dir
Loop


End Sub



but when i want to open the found files with Workbooks.open(file), instead of MsgBox file, it says "file not found"

Can anyone help?