Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Close worksheet with Macro or Code

How can I close a worksheet with a macro or code.


  #2   Report Post  
Posted to microsoft.public.excel.programming
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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to code macro for worksheet? Eric Excel Worksheet Functions 1 February 12th 09 06:14 AM
Ability to close a worksheet and email using a macro button Briant Excel Discussion (Misc queries) 1 November 29th 07 09:49 PM
How to code the Macro to save and close a file? Eric Excel Discussion (Misc queries) 7 June 10th 07 03:28 PM
Close worksheet by means of a macro Lloyd Excel Worksheet Functions 3 January 23rd 07 11:36 AM
VBA Code to kick off macro when workbook command to close is initi zulfer7 Excel Discussion (Misc queries) 2 June 23rd 06 08:04 PM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"