I need to create a button press that will automatically export each tab in the workbook to an individual Excel workbook.
This is the code I'm currently using; what do I need to change?
Sub ExportToXLSX()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Copy
nm = ws.Name
ws.SaveAs ("C:\Users\username\Desktop\Box 2 Files\" & nm & ".xlsx")
Next ws
End Sub
Edit: I also need these individual tabs to save to the specified file destination in addition to exporting into individual workbooks.