View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Loop thru folder and get similar names

H Garry,

Thanks for the reply.i tried implementing your approach,and it worked
fine.but the only problem i have is ,if i modilfied the file today
and i am running the same set of files tommorow,its taking the files
based on the date modified.so this is like, i have to compare
report101.xls with report101_Prod.xls.but if i modify
report101_Prod.xls and run the macro,the first file it takes is the
report101_Prod.xls.How to rectify this issue,i want to just loop thru
the files as it is,i dont want the files to be picked up by the date
modified

Thanks,
-L


Using my suggested approach[es], the files are picked up according to
the presence (or absence) of "_Prod" in the filename. This has nothing
to do with date modified. Perhaps it will help if you redefine your
criteria more clearly, and show the code you're using for doing this...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion