vba code - copy tab name to another spreadsheet

Leonidas75

Board Regular
Joined
May 12, 2015
Messages
52
Hello

Spreadsheet 1 Name : Weekly Results (tab 1 named : 01/04/2019; tab 2 named : 08/04/2019 etc....)
Spreadsheet 2 Name : Weekly Report (tab name is "Weekly Report")
Spreadsheet 2 tab with Date : Reporting Period ( tab name "Report Period" with Date entered in cell A1)

I have a spreadsheet named "Weekly Results" with a series of tabs based on each week (i.e. 01/04/2019; 08/04/2019....). A second spreadsheet named "Weekly Report" brings across the most active tab (in this instance the current weekly tab) from the "Weekly Results" spreadsheet.

Basically I require code to ask the Weekly Report spreadsheet to open the Weekly Results spreadsheet and using the reporting period specified in cell A1 within the "Weekly Report" spreadsheet to activate the corresponding tab named in the same date format and copy the sheet (not the tab) over to the Weekly Report - Weekly Report tab.

Hope you can help
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,215,775
Messages
6,126,829
Members
449,343
Latest member
DEWS2031

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top