ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open New Workbook / Save and Close Current Workbook (https://www.excelbanter.com/excel-programming/402416-open-new-workbook-save-close-current-workbook.html)

Joe K.

Open New Workbook / Save and Close Current Workbook
 

I would like to created a script to open the new workbook that I created.
Also in the script to save and close the active workbook.

Listed below are the parameters that I used to create the new workbook.

Thanks so much for the help.

With ActiveSheet 'New PRINT ORDERS Sheet in New Workbook
.Parent.SaveAs Filename:=ActWkbk.Path & "\" & "SEND_MAJORS_" & _
".xls"
'' Format(Now, "yyyyddmmhhmmss") & ".xls"
'
.Parent.Close savechanges:=False
End With





JLGWhiz

Open New Workbook / Save and Close Current Workbook
 
You would have to run your code from a personal workbook. If you try to run
it from the active workbook, it will stop when you close the active workbook.

"Joe K." wrote:


I would like to created a script to open the new workbook that I created.
Also in the script to save and close the active workbook.

Listed below are the parameters that I used to create the new workbook.

Thanks so much for the help.

With ActiveSheet 'New PRINT ORDERS Sheet in New Workbook
.Parent.SaveAs Filename:=ActWkbk.Path & "\" & "SEND_MAJORS_" & _
".xls"
'' Format(Now, "yyyyddmmhhmmss") & ".xls"
'
.Parent.Close savechanges:=False
End With






All times are GMT +1. The time now is 09:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com