• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Closing excel through a VB code

Hi Anupam,


Actually I've created a button in an application as EXIT...I want the file to close after performing certain defined functions, like hiding few sheets, saving the file.
 
This what you're looking for?

[pre]
Code:
Sub Examples()
'Close just this workbook
ThisWorkbook.Close

'Close all of Excel
Application.Quit

End Sub
[/pre]
 
Back
Top