Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.
Sub CheckTargetFile() Targetfile1 = "SR_" & cnty & ".txt" Dirname1 = "H:\srprod\Data Requests\" & typestudy & "Files\" & year 'To make sure that file exists With Application.FileSearch .NewSearch .LookIn = Dirname1 .Filename = Targetfile1 If .Execute() = 0 Then MsgBox "File not found. Not Created Yet", vbOKOnly Else Call Import End If End With
Join the community of 500,000 technology professionals and ask your questions.