MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Macro to close its own workbook?


Posted by Jeff Jeffries on February 14, 2002 4:29 AM

When I run a macro in workbook "A" to open another workbook "B", I want workbook "A" to close.. anyone know how, please?


Posted by Jeff Jeffries on February 14, 2002 5:57 AM

Forgot to mention.. I don't want the closing worksheet to prompt me to save changes.

Posted by Verges on February 14, 2002 3:51 PM

Workbooks("Custom Workbook2").Close saveChanges:=True


Posted by Verges on February 14, 2002 3:53 PM

Should be :- Workbooks("A").Close saveChanges:=True