Thread: Date looping
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jason Hancock Jason Hancock is offline
external usenet poster
 
Posts: 13
Default Date looping

I have gotten my macro working thanks to all of you. Now I'm trying to
make it less interactive for the user (i.e. remove as much human error
as possible in the hands of a not so computer literate person).

To that end, is it possible to create a loop that searches for a file
named “Projections Marc {Date}”, where date is the date that the file
was saved? For example:

Filename = “Projections Marc_2004-06-03.xls”

The search starts with the basic filename of “Projections Marc_” and
runs a loop that begins with the current system date and tries to find
the file. If it fails it removes one day from the date and searches
again. It continues in this manner until it either finds the file, or
it hits the date of the Monday of that week.



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!