santa12345
Board Regular
- Joined
- Dec 2, 2020
- Messages
- 70
- Office Version
- 365
- Platform
- Windows
Hello.
I have a macro which is working great thus far.
My last step is...copying sheet1 contents from one workbook to another workbook. Both workbooks are open and are named properly based on a script.
Variables are being used to name the xls files since the VB loops and the filenames are changing based on month, customer, fields within the file...etc..
when you hover over the variables (str123filename & str123filename1) within the vb, you will see the actual filename, etc..
So my question is, how do I activate one workbook using its variable name? And then copy sheet 1 to the other workbook.
I've tried things like.... str123filename.("sheets").sheet1.activate..etc..
I can't seem to get past this last step.
Any input would be greatly appreciated.
Thanks.
I have a macro which is working great thus far.
My last step is...copying sheet1 contents from one workbook to another workbook. Both workbooks are open and are named properly based on a script.
Variables are being used to name the xls files since the VB loops and the filenames are changing based on month, customer, fields within the file...etc..
when you hover over the variables (str123filename & str123filename1) within the vb, you will see the actual filename, etc..
So my question is, how do I activate one workbook using its variable name? And then copy sheet 1 to the other workbook.
I've tried things like.... str123filename.("sheets").sheet1.activate..etc..
I can't seem to get past this last step.
Any input would be greatly appreciated.
Thanks.