Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
fLiPMoD£
 
Posts: n/a
Default VBA to call file based on date

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.


  #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.




  #3   Report Post  
fLiPMoD£
 
Posts: n/a
Default

Perfect...you are a star.

Thanks.

"Bob Phillips" wrote in message
...
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.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic Populate Todays Date in Cell when File is Saved. Nello Excel Discussion (Misc queries) 3 April 21st 05 11:08 PM
Excel file modification date GROSNER Excel Discussion (Misc queries) 5 March 4th 05 01:19 AM
Formula to determine a future date based on criteria David Excel Worksheet Functions 2 December 15th 04 07:51 PM
Using formulas to determine date in one cell based on date in anot Gary Excel Worksheet Functions 2 November 22nd 04 08:11 AM
Show a date based on today DJ Dusty Excel Worksheet Functions 2 November 12th 04 03:20 AM


All times are GMT +1. The time now is 03:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"