ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Close worksheet with Macro or Code (https://www.excelbanter.com/excel-programming/278635-close-worksheet-macro-code.html)

sanaullah

Close worksheet with Macro or Code
 
How can I close a worksheet with a macro or code.



Ron de Bruin

Close worksheet with Macro or Code
 
Use this Sanaullah

ThisWorkbook.Close False ' close the file without saving

ThisWorkbook.Close True ' save and close the file


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"sanaullah" wrote in message ...
How can I close a worksheet with a macro or code.






All times are GMT +1. The time now is 07:10 PM.

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