I have an excel template that feeds data into a one of two master data excel files (165Master or 171Master) as the template is filled out.
Part of the code that is in the template that feeds the data into one of those Master files is:
The template is opened through the Master file, so either 165Master or 171Master will be open when data is entered into the template.
My problem is how can I assign wb so it detects the correct Master to place the data into?
Since one of the Master files is already open during this process, I thought there might be code that could detect an opened file with the name "Master" in it and assign that to wb since that would cover both 165Master and 171Master.
Or perhaps an if statement such as:
But I fall short of using correct syntax.
Any input is much appreciated.
Thank you.
Luke
Bookmarks