close excel

  1. F

    Close a workbook, prompt to save, then save workbook and Excel

    I’ve noticed many people trying to find code that on closing a workbook will prompt to save (if changes were made) and then close the workbook and close Excel. The following code should do the trick. Place this code in a module and link to a command button or shape Sub CloseWkBk()...
  2. A

    All Open Excel Workbooks Close on Completion of Macro

    Hi all, I have some VBA that takes raw output and adds columns to format the final file for upload to another database. At the end the macro shuts down all open instances of Excel. I tried to comment out the last few lines before my error handler (i.e., Application.Quit and...
  3. P

    Close workbook when UserForm is closed, or close excel when no other workbooks are active

    I have a workbook that, upon opening makes the application invisible and opens it's userform: Private Sub Workbook_Open() Parent.Application.Visible = False UserForm1.Show End Sub There is a button on the form to unhide the parent application again, in order for users to modify the sheets...
  4. B

    Application.DisplayAlerts=False & ActiveWorkbook.Saved=True Not Disabling Save Prompt at Close

    I am using TaskScheduler to open a spreadsheet to run an Auto_Open subroutine. The Auto_Open subroutine calls various subroutines to pull data from a server, perform calculations, update charts, export pdfs, and send emails. At the end of Auto_Open, a timed popup allows user intervention to stop...
  5. N

    Excel itself will not close; needs to be killed from Task Manager

    I have an Excel based application which loads an Add-in when the control spreadsheet is opened, and then when the user has completed the task, unloads the Add-in as part of the Workbook_Before Close process. The control spreadsheet is closed by clicking the "X" button on the workbook window...
  6. Jaafar Tribak

    Code to close and reopen Excel after a set time- Is it feasible ?

    I'm enquiring about this just out of intellectual curiosity . Any thoughts ? Regards.

Watch MrExcel Video

This Week's Hot Topics

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top