I have seen some of the other solution here on EE but I don't how to implement them to fit my situation. Here is my code that attempts to look for a file within a specified folder based on county, year, and status. If not found, a message box pops saying "File not found. Not Created Yet".
I just need to know how to re-arrange the variables I have already set to work with the workaround method for Excel 2007. This file was initially created in Excel 2003.
Targetfile1 = "SR_" & cnty & ".txt"
Dirname1 = "H:\srprod\Data Requests\" & typestudy & "Files\" & year
'To make sure that file exists
.LookIn = Dirname1
.Filename = Targetfile1
If .Execute() = 0 Then
MsgBox "File not found. Not Created Yet", vbOKOnly