I have a master reference sheet that has information for the top x customers. This file has x columns of data (such as address and priority), and x rows. This "master reference sheet" is Tab 1 in my Excel Workbook, let's call the workbook Customers. "Data" (Tab 2) in Customers contains data in accordance with each in Tab 1.
I have a VBA script that creates a new tab for each of the top x customers, uses all values in column y associated with each customer in "master reference sheet", searches for it in "Data", and returns all rows associated with said values. (This part is not that important, just know that I create new tabs for customers).
However, I receive a new "Data" tab nearly every day, which is in a different Excel workbook (Daily_Data). My question is the following: Can I run my VBA script, which is associated with the "Customers" workbook (which will contain only "master reference sheet" tab), on a separate Excel Workbook (which will contain only "Data" tab), and generate the tabs in the workbook containing the "Data" tab?
I do not want to copy and paste code at all. I want to run this VBA script every day without typing anything. The file I want to run the VBA script on (file containing "Data" tab) will have the same name every day (Daily_Data). I will have both Customers and Daily_Data open at the same time. I want to be able to click "Run Macro" from Customers, and generate these tabs in Daily_Data. I'm assuming this is fairly easy, but what is the best way to run code on a different Excel workbook?
I actually answered my own question. This question would have been difficult to answer properly without seeing my code anyways. Thank you.