I'm trying to automate a process in VBA but there's one point I've been stuck on for a long time now.
I've got 2 Excel workbooks - let's call them:
2018_W78_Workbook
&20180913_Z28 2018
These workbooks do have variable names.
By this I mean that the first workbook changes its name every year.
For example, 2019_W78_Workbook
becomes 2020_W78_Workbook
and so on.
The second workbook changes its name every month.
- The first 8 letters change every month,
- the next 4 letters are always the same and
- the last 4 change every year.
The worksheets of each workbook have constant titles.
I'm saying this because the always differing titles make it impossible to do this macro via recording.
The task is now to copy the worksheet of 20180913_Z28 2018
(Sheet A
) into 2018_W78_Workbook
?
These two workbooks would be the only open ones at the time of executing the macro.