LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Get the most recent file from a directory

I'm writing a VBA macro that compares data between the currently open
worksheet and the one produced the previous week. Right now the user has
to manually open the previous worksheet, but I thought it would be nifty
if I automatically open it.

So my question is, given a target folder cLocation and a pattern
"foo*.xls", how can I get the name of the most recent (prior to today)
matching file in that location?

--
Peter B. Steiger
Cheyenne, WY
If you must reply by email, you can reach me by placing zeroes
where you see stars: wypbs.**1 at gmail.com.
 
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
how do i delete a file from recent documents file in excel exile New Users to Excel 1 March 7th 09 01:59 AM
Importing most recent file wrcaz Excel Programming 2 May 27th 06 04:40 PM
Most Recent File problem - Help!! Wibs Excel Discussion (Misc queries) 1 November 20th 05 01:21 PM
~Recent File~ andibevan Excel Worksheet Functions 2 November 19th 04 08:52 PM
Locate Most Recent File andibevan Excel Programming 3 October 27th 04 12:13 PM


All times are GMT +1. The time now is 05:56 PM.

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

About Us

"It's about Microsoft Excel"