View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default 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.