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

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
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,215,719
Messages
6,126,432
Members
449,314
Latest member
MrSabo83

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