VBA - copy sheets from one workbook to a new workbook

j4ymf

Well-known Member
Joined
Apr 28, 2003
Messages
741
Office Version
  1. 365
Platform
  1. Windows
Hello

I have a .xlsm workwook which i need to copy 3x sheets from that wookbook to a new workbook, but i would like to copy each sheet into a seperate workbook and save them as a .xls
is that posible via VBA

the sheets i need to copy are,
Sell Rates
Productivity Rates
Cost Rates


many thanks

1649404791519.png


1649404825571.png
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Sub ChangeToBorisSheets()

'change Sell Rates to text
Sheets("Sell Rates").Select
Columns("C:C").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

'copy Sell Rates to new workbook
Sheets("Sell Rates").Select
Application.ScreenUpdating = False
ActiveSheet.Copy
With ActiveWorkbook
.SaveAs Filename:=ThisWorkbook.Path & "\" & Format("Sell Rates") & ".xls", FileFormat:=56
.Close SaveChanges:=False
End With

'copy Productivity Rates to new workbook
Sheets("Productivity Rates").Select
Application.ScreenUpdating = False
ActiveSheet.Copy
With ActiveWorkbook
.SaveAs Filename:=ThisWorkbook.Path & "\" & Format("Productivity Rates") & ".xls", FileFormat:=56
.Close SaveChanges:=False
End With

'copy Cost Rates to new workbook
Sheets("Cost Rates").Select
Application.ScreenUpdating = False
ActiveSheet.Copy
With ActiveWorkbook
.SaveAs Filename:=ThisWorkbook.Path & "\" & Format("Cost Rates") & ".xls", FileFormat:=56
.Close SaveChanges:=False
End With

Application.ScreenUpdating = True

End Sub

RESOLVED
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,394
Members
448,957
Latest member
Hat4Life

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