Like the title says, I'm trying to find out how to loop through a list of codes that I have on the main page of my excel spreadsheet that will then run through a SQL script and email out an attached spreadsheet to each specific email assigned to their specific code on the main page.
Attached I have a very small sample workbook to show you what the main page looks like and what the report will generate. I omitted 24 other pages because of redundancy. Basically I have vba scripting that when someone enters a code (like DM) into the requested star zone and hit Run Report, it loops through and grabs the Top 25 parts associated with that code and creates a worksheet for each one. All of the programming is done. My problem is that I'm trying to automate this for each code in that list and I don't know how.
So essentially I want it where I can blank out the requested star section and when i hit run report itll start with DM, go through DMs top 25 and then send an email out. Then it'll go to JE, do the same thing, mail it out. And then it'd go to JEB, JMT etc.
Can someone guide me in the right direction? I can attach all my code that generates the entirety of the report if that's helpful to show how i've arrived at where I'm currently at.
Thanks
Bookmarks