MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Shuting of the sheet with the macro

Posted by joe c on December 20, 2001 2:09 PM

I wrote a macro and assigned a macro button to run it.
After it runs the sheet I was in and the sheet with the macro are both open. How do I close the sheet with the macro. Since it contains the macro that is running I dont know if I can close. Any helps thanks!

Posted by Rick on December 20, 2001 4:18 PM

Try adding this to the end of the macro:


Posted by Larry Kramer on January 16, 2002 2:48 PM

Or maybe ThisWorkbook.close

Activeworkbook may be the one you want to keep open.