I have about 80 sheets in a workbook, and I would like to put each sheet into it's own workbook, and have that new workbook called by the value in Column A. Does anybody know how I would do this?
Sub SaveWS()
Dim wb As Workbook
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Copy
Set wb = ActiveWorkbook
wb.SaveAs ThisWorkbook.Path & ws.Range("A1").Value & ".xls"
wb.Close False
Next ws
End Sub
Okay, time for stupid questions.
1. Have you put the code in a standard module in your workbook with 80 sheets?
2. Where is your workbook with 80 sheets saved? Have you thoroughly checked that folder for files that weren't there before?
Okay - use Alt F11 to open the VBA editor (if it's not already open) and find the code that you pasted in. In the blue bar at the very top of the screen it should say something like "Microsoft Visual Basic - Book1 - [Module1 (Code)]".
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.