Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default 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




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fix code - check to see if a workbook is open, if so, save changes then close. J.W. Aldridge Excel Programming 6 October 13th 07 07:22 PM
Help on Workbook close and workbook save events Adam Harding Excel Programming 1 September 29th 05 04:12 PM
Close a the current workbook and load another specified workbook Adrian[_7_] Excel Programming 4 August 7th 04 05:29 PM
Close current Workbook after calling macro in other Des Janke Excel Programming 4 August 7th 03 07:33 AM
What commands do you use to name a workbook, save a workbook,open a workbook Steven R. Berke Excel Programming 1 July 24th 03 11:37 PM


All times are GMT +1. The time now is 07:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"