VBA Loop process that looks in host .xlm file location not an absolute file location

Okieguy19

New Member
Joined
Jan 23, 2014
Messages
1
I need to create a macro that will allow me to summarize certain data from all .xls files located within the file location of the "summary" workbook. The names of the workbooks and the locations of the workbooks I need to summarize are all dynamic and change weekly.

I don't know if the files I need to summarize are going to be in the C: D: E: etc... This needs to be a portable tool. I want to be able to run this excel macro on anyone's machine in my office. Summarizing the data from physically identical workbooks. There can be anywhere from 1 to 30 workbooks in a given file location.

I cannot for the life of me figure out how to write a code that will look for all files within the "current" file's location. similar to active worksheets... I need it to look for .xls files where ever the currently open summary workbook is sitting.

Hope that makes sense. I feel dumb asking, but it is what it is.

Thanks, CB
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,223,248
Messages
6,171,027
Members
452,374
Latest member
keccles

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