Search loop to find excel document in subfolders

met1713

New Member
Joined
May 27, 2015
Messages
10
I am a noob a programming in excel and need some help programming. I have a GUI in excel and you enter a station, a code, and process no. all in combo boxes and then hit search and then it searches for the excel file listed by process no. and i have my master file called program and then 6 six station folders inside that then in those about 64 code folders a piece and then inside those up to 120 process no folders. I started programming it as one big if elseif statement but quickly realized I should try to figure out a loop but didnt know where to start. In my program, my names for combo boxes are cbostation, cbocode, and cboprocess. Is their anyway to program a loop to find the excel process no. with out including every single folder, or making a 6000 line if elseif statement. Whoever takes the time to respond thank you for your time it will be a huge help
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,215,440
Messages
6,124,882
Members
449,193
Latest member
PurplePlop

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