Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have created an Excel Template and a macro that save it under a new name
the problem is that everytime it saves under new name the new book stays open as well as the template; i need the template to stay open and the book created close after saving; here is what i have so far Sub PrintAndClear() ' ' PrintAndClear Macro ' Macro recorded 9/10/2008 by me ' ' Keyboard Shortcut: Ctrl+Shift+Q ' response = MsgBox("Do you want to Save this to a new file?" _ , vbYesNo, "Save As") If response = 6 Then Name = InputBox("Enter a Filename", "Get Filename") If Name = "" Then End ActiveWorkbook.SaveAs Filename:="P:\" & Name & ".xls" End If ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Workbooks.Open Filename:="P:\Calculations Sheet-2008 WSO.xls" Range("E6").Select End Sub i tried adding ActiveWorkbook.Close after the print out but it does not work it closes the book and the template but leaves Excel running your help will be greatly appreciated -- Sigmund |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |