Hello all. Complete somewhat self-taught newbie here (so sorry in advance).
I have a macro that gives the user an option to copy data from EITHER a workbook (already) run once in the morning titled "YY-MM-DD BBC_Dispatch1.xlsx" opened from a folder, -OR- copy the report from a just-run workbook (if they wanted updated data in the afternoon) reporting live data titled "BBC_Dispatch1.xlsx". Either one of these workbooks will be open when the macro is run, NEITHER of them will be open at the same time.
In addition, I want to negate an issue where, when the live report is run for the first time, it is called "BBC_Dispatch1" however if run multiple times, the title changes from Dispatch1 to 2 or 3 (that is another macro I have no control over). So one of these reports could be titled "BBC_Dispatch4.xlsx".
The tab I want activated on both is called "tblDispatch", both Sheet3.
I have the code to activate JUST the "BBC_Dispatch1.xlsx" workbook and tab and it works just fine, but I want it to be easier on the user to pull from either source. Is there a way to Activate either worksheet (remember they will NOT be open at the same time) using multiple wildcards similar to what they would both have in common: "*BC_Dispatch*.xlsx", where the first * could be the date and the first B in one workbook, or just the first B in the other workbook; the second wildcard would represent the 1, 2, 3, etc? And then also activate the "tblDispatch" tab?
I just need to Activate, I have the rest of the copy/paste/formatting/pivot part working.
Thank you,
v.
I have a macro that gives the user an option to copy data from EITHER a workbook (already) run once in the morning titled "YY-MM-DD BBC_Dispatch1.xlsx" opened from a folder, -OR- copy the report from a just-run workbook (if they wanted updated data in the afternoon) reporting live data titled "BBC_Dispatch1.xlsx". Either one of these workbooks will be open when the macro is run, NEITHER of them will be open at the same time.
In addition, I want to negate an issue where, when the live report is run for the first time, it is called "BBC_Dispatch1" however if run multiple times, the title changes from Dispatch1 to 2 or 3 (that is another macro I have no control over). So one of these reports could be titled "BBC_Dispatch4.xlsx".
The tab I want activated on both is called "tblDispatch", both Sheet3.
I have the code to activate JUST the "BBC_Dispatch1.xlsx" workbook and tab and it works just fine, but I want it to be easier on the user to pull from either source. Is there a way to Activate either worksheet (remember they will NOT be open at the same time) using multiple wildcards similar to what they would both have in common: "*BC_Dispatch*.xlsx", where the first * could be the date and the first B in one workbook, or just the first B in the other workbook; the second wildcard would represent the 1, 2, 3, etc? And then also activate the "tblDispatch" tab?
I just need to Activate, I have the rest of the copy/paste/formatting/pivot part working.
Thank you,
v.