ireland13752
Member
Hello, I need to save selected tabs to a new file and then when finished delete those tabs. I have it all worked out except it is not saving only the tabs I have highlighted it is saving all tabs remaining in the file. Can you please assist me? Below is the code that I am using to save the tabs and then delete them.
Code:
Sheets(Array("DataD", "DCT")).Select
Sheets("DataD").Activate
ActiveSheet.SaveAs FileFormat:=xlWorkbookDefault, Filename:=Application.GetSaveAsFilename("DCT Weekly Report Review MM-DD-YY.xlsx")
Sheets(Array("DataD", "DCT")).Select
ActiveWindow.SelectedSheets.Delete
Sheets(Array("DataE", "EGH")).Select
Sheets("DataE").Activate
ActiveSheet.SaveAs FileFormat:=xlWorkbookDefault, Filename:=Application.GetSaveAsFilename("EGH Weekly Report Review MM-DD-YY.xlsx")
Sheets(Array("DataE", "EGH")).Select
ActiveWindow.SelectedSheets.Delete
Sheets(Array("DataS", "SGH")).Select
Sheets("DataS").Activate
ActiveSheet.SaveAs FileFormat:=xlWorkbookDefault, Filename:=Application.GetSaveAsFilename("SGH Weekly Report Review MM-DD-YY.xlsx")
Sheets(Array("DataS", "SGH")).Select
ActiveWindow.SelectedSheets.Delete
Sheets(Array("DataP", "PRMC")).Select
Sheets("DataP").Activate
ActiveSheet.SaveAs FileFormat:=xlWorkbookDefault, Filename:=Application.GetSaveAsFilename("PRMC Weekly Report Review MM-DD-YY.xlsx")
Sheets(Array("DataP", "PRMC")).Select
ActiveWindow.SelectedSheets.Delete
Sheets(Array("DataL", "LCMC")).Select
Sheets("DataL").Activate
ActiveSheet.SaveAs FileFormat:=xlWorkbookDefault, Filename:=Application.GetSaveAsFilename("LCMC Weekly Report Review MM-DD-YY.xlsx")
Sheets(Array("DataL", "LCMC")).Select
ActiveWindow.SelectedSheets.Delete
Sheets(Array("Review Summary", "Data")).Select
Sheets("Review Summary").Activate
ActiveSheet.SaveAs FileFormat:=xlWorkbookDefault, Filename:=Application.GetSaveAsFilename("SL Weekly Report Review MM-DD-YY.xlsx")