VBA Pick - two input files from a structured folder

Mallesh23

Well-known Member
Joined
Feb 4, 2009
Messages
976
Office Version
  1. 2010
Platform
  1. Windows
Hi Team,

Need help in picking latest input file and Previous Input file from a folders.

Everyday we download input file save that file in a Folder date wise.

Latest dates folder which Contains Single Input File will be :=> Current workbook.
Immediate Previous dates folder which contain Single Input file :=> is Previous workbook.

if month changes Macro should pick Previous months last folders input file as Previous workbook.


Folder structure will be as follows.

Main Folder :=> Review
Sub Folder Yearly :=> 2020 ..it will change yearly
Sub Folder Monthly :=> Aug.2020 . It will change as per month monthly
Sub Folder Date Wise :=> everyday there will be one folder and one single input file in that
a) 05.08.2020
b) 06.06.2020
c) 07.06.2020

Please suggest how to open programatically Current workbook and Previous workbook. Thanks in advance!

Also attached dummy Snapshot.



Thanks
mg
 

Attachments

  • Folder Structure...Snapshot.PNG
    Folder Structure...Snapshot.PNG
    62.4 KB · Views: 3

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,214,904
Messages
6,122,169
Members
449,070
Latest member
webster33

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top