Hi CJ, try this code:
Sub Save_Sheet_As_New_Workbook()
' Written by Barrie Davidson
Dim New_file_name
'
New_file_name = Application.GetSaveAsFilename(, "Microsoft Excel Workbook (*.xls), *.xls")
ActiveSheet.Copy
ActiveWorkbook.SaveAs FileName:=New_file_name, FileFormat:=xlNormal
ActiveWindow.Close
End Sub
Regards,
Barrie
Thanks Barrie, but is there a way to export just the data and the subtotals, without any of the macros or code or command buttons? Thanks so much!
CJ, do you have buttons on the sheet you want to copy?
No - I have buttons on the sheet to run the code. Once the code is run, all I want in the new spreadsheet is the newly formatted data. I don't want to macros and the buttons. This will be going to customers and they will get confused if all of that is included as well. Does that make sense?
Makes perfect sense. All you need to do is change:
ActiveSheet.Copy
to:
Sheets("Name").Copy
where "Name" is the name of the worksheet you want to copy.
Barrie No - I have buttons on the sheet to run the code. Once the code is run, all I want in the new spreadsheet is the newly formatted data. I don't want to macros and the buttons. This will be going to customers and they will get confused if all of that is included as well. Does that make sense?