VBA/Macro Assistance Needed - Copying Sheets and Saving Files

NelsonSN25

New Member
Joined
Feb 25, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Good evening,

I am a novice in trying to build a VBA/macro. I am looking for assistance to perform the following:
1. Copy "Sheet1" tab into a new workbook and save file in in C:\Users\953051\Desktop\2021 Project - BinLocUpload
2. Copy "Sheet2" and "Sheet3" tabs into a new workbook and save file in C:\Users\953051\Desktop\2021 Project - BinLocReview

Can someone assist? Thank you!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Change the file names to suit.

Rich (BB code):
Sub SaveSheets()
    
    ThisWorkbook.Sheets("Sheet1").Copy
    ActiveWorkbook.SaveAs "C:\Users\953051\Desktop\2021 Project - BinLocUpload\Sheet1.xlsx", FileFormat:=51
    ActiveWorkbook.Close SaveChanges:=False
    
    ThisWorkbook.Sheets(Array("Sheet2", "Sheet3")).Copy
    ActiveWorkbook.SaveAs "C:\Users\953051\Desktop\2021 Project - BinLocReview\Sheet2-3.xlsx", FileFormat:=51
    ActiveWorkbook.Close SaveChanges:=False
    
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,153
Messages
6,129,176
Members
449,491
Latest member
maxim_sivakon

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