using the code below I ge the error 'Specified file not found' and the final part of the last line from 'The Workbook.Open ' is highlighted in yellow. However if from this point I press F5 then the file is opened and the code continues to run. any idea's why it doesn't find the file first time around?
PHP Code:
strpath = ThisWorkbook.Path & "\"
If Dir(ThisWorkbook.Path & "\data file.xls") <> "" Then
Application.ScreenUpdating = False
If Not Evaluate("ISREF('[data file.xls]Sheet1'!A1)") Then Workbooks.Open (strpath & "data file.xls")
Bookmarks