Need help! - Search Macro to retrieve a file from a subdirectory

Caveman1964

Board Regular
Joined
Dec 14, 2017
Messages
127
Office Version
  1. 2016
Platform
  1. Windows
Hi!
I would like a search macro to retrieve a file from a subdirectory and the file will have a lot number with report on end and be a .xlsm. and then it retrieves it.
Example;
Click button for msgbox to ask what lot number
user enters it
then it searches through "L:\Job Packets"Product""Lot numbers""Lot number+report.xlsm"
real example
L:\Job Packets\WheelBarrel\123456\123456report.xlsm
User to enter 123456 and it gets the 123456report.xlsm

Thanks for any help on this.
if the msgbox is too much then he/she could just enter in a cell but prefer the msgbox from clicking macro. Either way will work.
Thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
So what about just a macro that retrieves a file?
I am working on this still don't have it working. If someone could get me started, I could possible figure it out.
Thanks!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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