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: 1
Default Selecting the most recent file in a folder by Macro/VBA script

My spreadsheet has a macro that currently auto opens a file with a
specified name from a specified location then takes a series of
actions. I'd like to have a script that will go to the folder and open
the most recent file, regardless of what it is named. Any advice is
appreciated!

Here is the part of the macro that currently opens the file and brings
over info to the active workbook:

Workbooks.Open Filename:= _
"H:\DOWNLOAD\CURRENT\Download for Workup\ForWorkup.xls"
Sheets("DOWNLOAD CURRENT EMPLOYEES 3").Copy Befo=Workbooks( _
"Workup Template.xls").Sheets(3)
Windows("ForWorkup.xls").Activate
ActiveWorkbook.Close

 
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
new office docs not showing up in recent items folder Mike Lager Excel Discussion (Misc queries) 0 January 9th 09 03:59 PM
How to generate a text file from Excel using a macro or script? Frank Excel Discussion (Misc queries) 1 January 6th 08 05:11 PM
How to generate a text file from Excel using a macro or script? Frank Excel Discussion (Misc queries) 0 January 6th 08 05:11 PM
Macro to open most recent file with a particular filename string kwiklearner Excel Discussion (Misc queries) 1 August 23rd 06 01:24 AM
a macro to run for each file in the same folder דיצה Excel Programming 1 January 5th 06 03:21 AM


All times are GMT +1. The time now is 11:59 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"