Close and Reopen the Current Workbook

This post will guide you how to close the current workbook with shortcut in excel. How to close and reopen the current workbook with shortcuts in excel. How to close and reopen the current workbook with VBA macro code in excel. How do I close a reopen the current workbook without saving in Excel. How to save, close and reopen the current workbook with VBA macro code in excel.

Close and Reopen the Current Workbook with shortcuts


If you want to close and reopen the current workbook, you can use the shortcuts to quickly achieve it.

To close the current workbook, you can press Alt +F +C to close it.

To reopen the current workbook, you can press Alt +F +R +1 shortcuts.

Save ,Close and Reopen the Current Workbook with VBA Macros


Assuming that you would like to have a macro in your current workbook in excel that would save and close whatever workbook is currently active and then reopen it. You can write down the following VBA macro code, just do the following steps:

#1 open your excel workbook and then click on “Visual Basic” command under DEVELOPER Tab, or just press “ALT+F11” shortcut.

Get the position of the nth using excel vba1

#2 then the “Visual Basic Editor” window will appear.

#3 click “Insert” ->”Module” to create a new module

convert column number to letter3

#4 paste the below VBA code into the code window. Then clicking “Save” button.

Sub SaveCloseReOpen()
    ThisWorkbook.save
    Application.Workbooks.Open(ThisWorkbook.FullName)
End Sub

#5 back to the current worksheet, then run the above excel macro. Click Run button.

 

Close and Reopen the Current Workbook without saving with VBA Macros


If you want to close and reopen the current workbook without saving, you can use the below VBA macro code to achieve the result.

Sub CloseReopen()
    ThisWorkbook.Saved = True
    ThisWorkbook.ChangeFileAccess xlReadOnly, , False
    Application.Wait Now + TimeValue("00:00:01")
    ThisWorkbook.ChangeFileAccess xlReadWrite, , True
End Sub

 

Leave a Reply