View Single Post
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Dim sFile As String

sFile = Dir("C:myPath\userfile_run_" & Format(Date,"yyyymmdd") & ".xls")
If sFile < "" Then
Msgbx "File Exists
End If

--

HTH

RP
(remove nothere from the email address if mailing direct)


"fLiPMoD£" wrote in message
...
Hello,

I wonder if anyone can help me with a VBA routine to check for the

presence
of a specific file.
The file is saved on a dialy basis in the format

"userfile_run_YYYYMMDD.xls"

i am seeking help with a vb code that will check if today or any

specified
days report is generated. i guess excel can use the date format to read

the
specified location for the file.

Thank you in advance for your help.


....Coming from Where I'm from.