Close all windows excel

Excel for Microsoft 365 Excel 2021 Excel 2019 Excel 2016 Excel 2013 More…Less

When your computer is running a single instance of Excel, all workbooks that you open are opened in a workbook window inside the Excel window. You can also create new workbook windows for any worksheet in a workbook by using the New Window command (View tab, Window group).

For more information, see View two or more worksheets at the same time.

You can close each of these workbook windows one at a time, or you can close the entire workbook (including all of its workbook windows). To close all workbooks that are open, you can close the Excel window or exit Excel.

  1. Click the workbook window that you want to close.

  2. Click the Excel Close Button in the upper-right corner of the workbook window.

Note: If the window is the only open window of the workbook, the whole workbook is closed. If there are more workbook windows of the same workbook, only the active workbook window is closed.

  1. Activate the workbook that you want to close.

  2. On the File tab, click Close.

Do one of the following:

  • In the upper-right corner of the Excel window, click Close Button image.

  • On the File tab, click Exit.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Need more help?

Excel for Microsoft 365 Excel 2021 Excel 2019 Excel 2016 Excel 2013 More…Less

When your computer is running a single instance of Excel, all workbooks that you open are opened in a workbook window inside the Excel window. You can also create new workbook windows for any worksheet in a workbook by using the New Window command (View tab, Window group).

For more information, see View two or more worksheets at the same time.

You can close each of these workbook windows one at a time, or you can close the entire workbook (including all of its workbook windows). To close all workbooks that are open, you can close the Excel window or exit Excel.

  1. Click the workbook window that you want to close.

  2. Click the Excel Close Button in the upper-right corner of the workbook window.

Note: If the window is the only open window of the workbook, the whole workbook is closed. If there are more workbook windows of the same workbook, only the active workbook window is closed.

  1. Activate the workbook that you want to close.

  2. On the File tab, click Close.

Do one of the following:

  • In the upper-right corner of the Excel window, click Close Button image.

  • On the File tab, click Exit.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Need more help?

Close All Excel Files

In Excel 2013 and later versions, each file opens in a separate window. Unlike earlier single-window versions, there is no Exit button or command, to close all the files, without clicking each window individually.

How to Close All Excel Files

Even though the Exit command is missing, there are a few ways to close all open windows in Excel 2013 and later versions.

Use a workaround, or use one of the shortcuts shown below.

Customize the QAT

The Quick Access Toolbar (QAT) is a great place to add commands that are missing or hard to get to.

To add Close All and Exit commands, follow these steps:

  • Right-click the QAT, and click “Customize Quick Access Toolbar”
  • From the “Choose Commands From” drop down list, select “All Commands”
  • Scroll down, and click on Close All.
  • Click the Add button, to put that command on the  QAT.
    NOTE: It will be added below the command that is selected in the list at the right.
  • Scroll down to the Exit command, and add it to the QAT
  • Click OK, to close the Excel Options window.

closeall04

Use the QAT Buttons

After you add the Close All and Exit commands to the QAT, use those commands to close all Excel files.

  • Close All – Closes all the Excel files, and leaves an empty window open
  • Exit – Closes all the Excel files, and closes Excel

closeall05

Go to my Contextures site, for more tips on working with the QAT.

Excel Window “X”

Another way to close all Excel files is with the “X” at the top right of the Excel window.

  • If you simply click that “X”, it will close the active window only.
  • To close all Excel files, press the Shift key, and click the X

Shift and click X

Excel will prompt you to save any unsaved files, and then all the windows will close.

File Command

Another way to close all Excel files is with this sequence of shortcut keys.

  • Press the Alt key, and tap the F key, to activate the File tab.
  • Then, tap the X key, as a shortcut to Exit.

NOT: Even though the X shortcut doesn’t appear in the list, the Exit command runs when you tap X.

closeall02

Windows Taskbar

Here’s one more way to close all Excel files.

  • Right-click the Excel icon in the Windows Taskbar, at the bottom of your screen.
  • Then click the Close All Windows command.

closeall03

NOTE: This only works if the Taskbar has “Always, hide labels” as the setting for “Combine taskbar buttons”. (thanks J.Woolley)

To change that setting, right-click the Taskbar, and click Taskbar Settings.

Taskbar Settings

More Excel Tips

For more Excel file tips, go to the Excel Application and File FAQs page on my Contextures site.

Video: Close All Excel Files

Watch this video to see how to add the Close All and Exit buttons to the Quick Access Toolbar.

Your browser can’t show this frame. Here is a <a href=”https://youtu.be/oHLU5oZYfGI” rel=”nofollow” target=”_blank”>link</a> to the page

________________________

How to Close All Excel Files

Close All Excel Files

________________________

Содержание

  1. How to Close All Excel Files
  2. How to Close All Excel Files
  3. Customize the QAT
  4. Use the QAT Buttons
  5. Excel Window “X”
  6. File Command
  7. Windows Taskbar
  8. More Excel Tips
  9. Video: Close All Excel Files
  10. How to Close All Excel Files
  11. 4 thoughts on “How to Close All Excel Files”
  12. Как сохранить и закрыть все открытые файлы книги Excel
  13. Совет № 1: Shift + кнопка закрытия окна
  14. Совет № 2: добавьте кнопку «Закрыть все» на панель быстрого доступа
  15. Совет № 3: Закройте все открытые книги с помощью макроса
  16. У вас есть свои советы по сохранению и закрытию файлов?
  17. VBA script to close every instance of Excel except itself
  18. Extra Credit:
  19. 6 Answers 6
  20. 3 Tips to Save and Close All Open Excel Workbook Files + Macro
  21. Tip #1: Shift + Close Window Button
  22. Tip #2: Add the Close All Button to the Quick Access Toolbar
  23. Tip #3: Close All Open Workbooks with a Macro
  24. Macro to Close All Workbooks Without Saving
  25. How does this macro work?
  26. Macro to Save All Except New Unsaved Workbooks (Scratch Pads)
  27. How does this macro work?
  28. Macro to Save and Close All Workbook and Automatically Name Files
  29. How does this macro work?
  30. Free Webinar on Getting Started with Macros & VBA
  31. What Are Your Tips for Savings & Closing Files?

How to Close All Excel Files

In Excel 2013 and later versions, each file opens in a separate window. Unlike earlier single-window versions, there is no Exit button or command, to close all the files, without clicking each window individually.

How to Close All Excel Files

Even though the Exit command is missing, there are a few ways to close all open windows in Excel 2013 and later versions.

Use a workaround, or use one of the shortcuts shown below.

Customize the QAT

The Quick Access Toolbar (QAT) is a great place to add commands that are missing or hard to get to.

To add Close All and Exit commands, follow these steps:

  • Right-click the QAT, and click “Customize Quick Access Toolbar”
  • From the “Choose Commands From” drop down list, select “All Commands”
  • Scroll down, and click on Close All.
  • Click the Add button, to put that command on the QAT.
    NOTE: It will be added below the command that is selected in the list at the right.
  • Scroll down to the Exit command, and add it to the QAT
  • Click OK, to close the Excel Options window.

Use the QAT Buttons

After you add the Close All and Exit commands to the QAT, use those commands to close all Excel files.

  • Close All – Closes all the Excel files, and leaves an empty window open
  • Exit – Closes all the Excel files, and closes Excel

Excel Window “X”

Another way to close all Excel files is with the “X” at the top right of the Excel window.

  • If you simply click that “X”, it will close the active window only.
  • To close all Excel files, press the Shift key, and click the X

Excel will prompt you to save any unsaved files, and then all the windows will close.

File Command

Another way to close all Excel files is with this sequence of shortcut keys.

  • Press the Alt key, and tap the F key, to activate the File tab.
  • Then, tap the X key, as a shortcut to Exit.

NOT: Even though the X shortcut doesn’t appear in the list, the Exit command runs when you tap X.

Windows Taskbar

Here’s one more way to close all Excel files.

  • Right-click the Excel icon in the Windows Taskbar, at the bottom of your screen.
  • Then click the Close All Windows command.

NOTE: This only works if the Taskbar has “Always, hide labels” as the setting for “Combine taskbar buttons”. (thanks J.Woolley)

To change that setting, right-click the Taskbar, and click Taskbar Settings.

More Excel Tips

For more Excel file tips, go to the Excel Application and File FAQs page on my Contextures site.

Video: Close All Excel Files

Watch this video to see how to add the Close All and Exit buttons to the Quick Access Toolbar.

How to Close All Excel Files

4 thoughts on “How to Close All Excel Files”

Excellent post! Just what I was looking for.

Источник

Как сохранить и закрыть все открытые файлы книги Excel

Итог: Изучите несколько трюков и советов, чтобы сохранить и закрыть все открытые книги Excel.

Уровень мастерства: Начинающий

Если вы используете Excel весь день каждый день, как я, то у вас, наверняка, открыто много рабочих книг одновременно. Я стараюсь дисциплинировать себя, но иногда это трудно. И в конце дня мы просто хотим закрыть все открытые рабочие тетради и пойти домой! Итак, этот пост содержит несколько советов по быстрому закрытию всех открытых файлов, чтобы помочь сократить трафик в час пик.

Совет № 1: Shift + кнопка закрытия окна

Самый быстрый способ закрыть все открытые книги — это удерживать клавишу Shift, нажимая кнопку «Закрыть окно». Кнопка «Закрыть окно» — это «х» в правом верхнем углу окна приложения

Если все открытые книги были сохранены, все они будут закрыты.

Если какая-либо из открытых книг НЕ была сохранена, вам будет предложено сохранить файл. Появится всплывающее окно, и вам придется нажимать Сохранить или Не сохранять для каждой несохраненной книги.

Окно также содержит кнопку Сохранить все. Вы можете нажать эту кнопку, чтобы сохранить все несохраненные книги за один шаг.

Нажатие на кнопку «Отмена» отменит всю операцию, а все еще открытые книги останутся открытыми.

Но что, если мы не хотим сохранить все или некоторые из открытых рабочих книг? Мы вернемся к этому в совет № 3.

Совет № 2: добавьте кнопку «Закрыть все» на панель быстрого доступа

Мы также можем добавить кнопку «Закрыть все» на панель быстрого доступа (QAT), чтобы закрыть все открытые книги. Это делает то же самое, что и сочетание клавиш Shift + Close Window.

Преимущество здесь в том, что мы можем использовать сочетание клавиш для нажатия кнопки. Доступ к кнопкам QAT можно получить с помощью сочетания клавиш, нажав клавишу Alt и номер, назначенный кнопке.

Чтобы добавить кнопку «Закрыть все» в QAT, откройте окно параметров Excel («Файл»> «Параметры») и следуйте инструкциям на изображении ниже.

После нажатия кнопки «Закрыть все» нам будет предложено то же окно, как описано в совете № 1.

Бонусный совет: мы также можем использовать сочетание клавиш Ctrl + W, чтобы закрыть одну книгу. Я упомянул этот совет в своем посте по 17 ярлыкам Excel на 2017 год.

Совет № 3: Закройте все открытые книги с помощью макроса

В этом разделе я поделюсь несколькими макросами, которые можно использовать для закрытия всех открытых рабочих книг. Макросы дают нам большую гибкость, когда мы хотим контролировать, какие книги сохраняются перед закрытием.

Макрос для закрытия всех книг без сохранения

Если мы не хотим сохранять какие-либо открытые файлы, мы можем использовать следующий макрос.

Как работает этот макрос?

Приведенный выше макрос просматривает все открытые книги на компьютере с помощью цикла For Next Loop. Он использует оператор If, чтобы проверить, является ли файл в цикле (wb.Name) НЕ (<>) файлом, который содержит код ThisWorkbook.Name.

Затем он использует метод Workbooks.Close (страница справки MSDN), чтобы закрыть книгу. Метод Close имеет необязательный параметр для SaveChanges. Мы можем установить значение True, чтобы сохранить изменения, и False, чтобы закрыть без сохранения.

Примечание. Этот макрос следует запускать только в том случае, если вы уверены, что не хотите сохранять изменения ни в одном из открытых файлов. Его нельзя отменить. Возможно, вы также захотите добавить окно сообщения Да / Нет, чтобы предупредить пользователя перед запуском этого макроса.

Макрос для сохранения всех, кроме новых несохраненных книг (блокнот)

В конце рабочего дня у меня обычно есть несколько книг, которые я хочу сохранить, и некоторые, которые я НЕ хочу сохранять. Я часто открываю новые рабочие книги, чтобы использовать файлы Excel для быстрых вычислений. Я называю их «блокноты». Я не хочу сохранять их, но хочу сохранить все другие открытые файлы.

Файлы — блокноты никогда не сохранялись, поэтому они еще не имеют расширения. Они называются: Book1, Book2, Book2 и т.д. Обратите внимание, что на снимке экрана отсутствует расширение файла (.xlsx, .xlsm).

Таким образом, мы можем добавить оператор If в наш макрос, чтобы увидеть, существует ли расширение файла. Если расширение файла существует, то мы сохраним файл. Если нет, то мы закроем без сохранения.

Как работает этот макрос?

Этот макрос похож на макрос для закрытия всех книг. Разница в том, что мы используем оператор If, чтобы проверить, имеет ли файл расширение.

Функция Right используется для возврата 5 символов в конце имени файла. Если wb — это существующий файл, который уже был сохранен, то Right (wb.Name, 5) вернет «.xlsx» или «.xlsm».

Функция Instr (страница справки MSDN) используется для поиска строки в строке. Возвращает начальный номер строки. Таким образом, если Instr находит «.xls» в пределах «.xlsx» или «.xlsm», он возвращает 1. В противном случае он возвращает 0.

Оператор If проверяет, является ли возвращаемое значение из Instr больше 0, и сохраняет изменения при закрытии книги. В противном случае изменения не сохраняются для книг, которые НЕ содержат расширения.

Макрос для сохранения и закрытия всех книг и автоматического именования файлов

Иногда нам можем быть нужно сохранить некоторые из этих новых файлов (блокноты), но у нас нет времени, чтобы просмотреть каждый файл и сохранить его с именем.

Следующий макрос сохранит и закроет ВСЕ файлы и автоматически назовет новые файлы, которые не были сохранены. Он помещает все новые файлы (блокнот) в указанную вами папку.

Затем вы можете вернуться в эту папку, когда у вас будет свободное время для перемещения и переименования файлов.

Как работает этот макрос?

Этот макрос работает аналогично двум другим выше. Единственное отличие состоит в том, что он сохраняет новые файлы (блокноты) в папку на вашем компьютере.

Чтобы использовать этот макрос, вам нужно изменить переменную sPath на папку на вашем компьютере. Обязательно заканчивайте строку пути к файлу обратной косой чертой.

У метода Workbooks.Close есть еще один необязательный параметр (Filename), который позволяет нам указать имя файла, в котором мы хотим сохранить файл, если файл еще не был сохранен.

Если мы не используем параметр «Имя файла», Excel предложит нам меню «Сохранить как» для каждого файла. Таким образом, указание имени файла обходит это окно и может сэкономить нам много времени.

Значение параметра Filename объединяет строку для полного пути к файлу. Он также изменяет текущую дату и время до конца имени файла, используя функции «Формат» и «Сейчас». Функция Format в VBA аналогична функции TEXT в Excel и позволяет нам указать числовой формат. Функция «Сейчас» возвращает текущую дату и время на компьютере пользователя.

Я рекомендую добавить эти макросы в вашу личную книгу макросов, чтобы вы могли использовать их в любое время. Чтобы узнать больше, ознакомьтесь с моей статьей и видео о личной книге макросов.

У вас есть свои советы по сохранению и закрытию файлов?

Я надеюсь, что эти советы и макросы помогут вам закончить день немного быстрее. Есть ли у вас какие-либо другие советы по закрытию файлов? Пожалуйста, оставьте комментарий ниже с любыми предложениями или вопросами. Спасибо!

Источник

VBA script to close every instance of Excel except itself

I have a subroutine in my errorhandling function that attempts to close every workbook open in every instance of Excel. Otherwise, it might stay in memory and break my next vbscript. It should also close every workbook without saving any changes.

This code isn’t optimal, however. For example, it can close 2 workbooks in one instance of Excel, but if you open 2 instances of excel, it will only close out 1.

How can I rewrite this to close all Excel without saving any changes?

How to do this for Access as well without closing the Access file that is hosting this script?

6 Answers 6

You should be able to use window handles for this.

It appears to me GetObject returns the «oldest» Access instance. So that sub closes all Access instances started before the one which is running the sub. Once it finds itself, it stops. Maybe that’s fine for your situation. But if you need to also close Access instances started after the one which is running the code, look to Windows API window handle functions.

I didn’t try this approach for Excel. But I did see Excel provides Application.Hwnd and Application.Hinstance . so I suspect you can do something similar there.

Also, notice I got rid of On Error Resume Next . GetObject will always return an Application object in this sub, so it didn’t serve any purpose. Additionally, I try to avoid On Error Resume Next in general.

Источник

3 Tips to Save and Close All Open Excel Workbook Files + Macro

Bottom line: Learn a few shortcuts and tips to save and close all open Excel workbooks.

Skill level: Beginner

If you use Excel all day every day like I do, then it can be easy to have a lot of workbooks open at the same time. I try to stay disciplined with this, but sometimes it’s hard. And at the end of the day, we just want to close all open workbooks and go home! So this post contains a few tips for quickly closing all open files to help beat rush hour traffic. 🙂

Tip #1: Shift + Close Window Button

The quickest way to close all open workbooks is to hold the Shift key while pressing the Close Window button. The Close Window button is the “x” in the top-right corner of the application window.

If all of the open workbooks have been saved, then they will all be closed.

If any of the open workbooks have NOT been saved, then you will be prompted to save the file. The pop-up window will appear and you will have to press Save or Don’t Save for each unsaved workbook.

The window also contains a Save All button. You can press this to Save All the unsaved workbooks in one step.

Clicking the Cancel button will cancel the entire operation and the wordbooks that are still open will remain open.

But what if we don’t want to save all or some of the open workbooks? We’ll get to that in tip #3.

Tip #2: Add the Close All Button to the Quick Access Toolbar

We can also add the Close All button to the Quick Access Toolbar (QAT) to close all open workbooks. This does the same thing as the Shift+Close Window shortcut.

The advantage here is that we can use a keyboard shortcut to press the button. The QAT buttons can be accessed with a keyboard shortcut by pressing the Alt Key and the number assigned to the button.

To add the Close All button to the QAT, open the Excel Options window (File>Options) and follow the steps on the image below.

After pressing the Close All button we will be prompted with the same window as described in tip #1.

Bonus Tip: We can also use the keyboard shortcut Ctrl+W to close a single workbook. I mentioned this tip in my post on 17 Excel shortcuts for 2017.

Tip #3: Close All Open Workbooks with a Macro

In this section I will share a few macros that can be used to close all open workbooks. The macros give us a lot more flexibility when we want to control which workbooks are saved before closing.

You can download the Excel file that contains the macros here.

Macro to Close All Workbooks Without Saving

If we don’t want to save any of the open files, then we can use the following macro.

How does this macro work?

The macro above loops through all of the open workbooks on the computer using a For Next Loop. It uses an If statement to check if the file in the loop (wb.Name) is NOT (<>) the file that contains the code ThisWorkbook.Name.

It then uses the Workbooks.Close method (MSDN Help Page) to close the workbook. The Close method has an optional parameter to SaveChanges. We can set this to True to save changes, and False to close without saving.

Note: This macro should only be run if you are certain you don’t want to save changes to any of the open files. There is no way to undo this. You might also want to add a Yes/No Message Box prompt to warn the user before running this macro.

Macro to Save All Except New Unsaved Workbooks (Scratch Pads)

At the end of my workday I usually have a combination of some workbooks that I want to save, and some that I do NOT want to save. I often open new workbooks to use the Excel files for quick calculations. I call these “scratch pads”. I don’t necessarily want to save these, but I might want to save all other open files.

The scratch pad files have never been saved, so they don’t have a file extension yet. They are named: Book1, Book2, Book2, etc. Notice in the screenshot that there is no file extension (.xlsx, .xlsm).

So we can add an If statement to our macro to see if a file extension exists. If the file extension exists, then we will save the file. If not, then we will close without saving.

How does this macro work?

This macro is similar to the macro to close all workbooks. The difference is we use an If statement to test if the file has an extension.

The Right function is used to return the 5 characters at the end of the file name. If wb is an existing file that has already been saved, then Right(wb.Name, 5) will return “.xlsx” or “.xlsm”.

The Instr function (MSDN Help Page) is used to find a string within a string. It returns the starting character number of the string. So, if Instr finds “.xls” within “.xlsx” or “.xlsm”, it will return 1. Otherwise, it will return a 0.

The If statement checks if the return value from Instr is greater than 0, and saves changes while closing the workbook. Otherwise, changes are not saved for workbooks that do NOT contain an extension.

Macro to Save and Close All Workbook and Automatically Name Files

Sometimes we might want to save some of those new files (scratch pads), but don’t have time to go through each file and save it with a name. This is like hitting the Excel eject button when we don’t want to lose any of our work.

The following macro will save and close ALL files, and automatically name the new files that have not been saved. It puts all the new (scratch pad) files in a folder that you specify.

You can then go back to that folder when you have some free time to move and rename the files.

How does this macro work?

This macro works similar to the other two above. The only difference is that it saves the new files (scratch pads) to a folder on your computer.

To use this macro you will need to change the sPath variable to a folder on you computer. Make sure to end the file path string with a back slash.

The Workbooks.Close method has another optional parameter (Filename) that allows us to specify a file name where we want to save the file, if the file has NOT been saved yet.

If we do not use the Filename parameter, then Excel will prompt us with the Save As menu for each file. So, specifying the Filename bypasses this window and can save us a lot of time.

The value of the Filename parameter is concatenating the string for the full file path. It is also amending the current date and time to the end of the file name using the Format and Now functions. The Format function in VBA is similar to the TEXT function in Excel, and allows us to specify a number format. The Now function returns the current date and time on the user’s computer.

I recommend adding these macros to your Personal Macro Workbook so you can use them anytime. Checkout my article and video series on the personal macro workbook to learn more.

Free Webinar on Getting Started with Macros & VBA

If you are interested in learning more about macros, I’m currently running my free webinar called “The 7 Steps to Getting Started with Macros & VBA”. It’s running all this week, and it’s absolutely free to register.

During the webinar I explain why you might want to learn VBA, and a lot of the basic coding concepts that will help you get started. I jump into Excel and the VB Editor and walk through how to write and run our first macro. Even if you have been using VBA for awhile, I’m sure you will learn some new tips.

What Are Your Tips for Savings & Closing Files?

I hope those tips and macros help you end the day a little quicker. Do you have any other tips for closing files. Please leave a comment below with any suggestions or questions. Thank you!

Источник

На чтение 8 мин. Просмотров 6.8k.

Итог: Изучите несколько трюков и советов, чтобы сохранить и закрыть все открытые книги Excel.

Уровень мастерства: Начинающий

3 Tips to Save and Close All Files2

Если вы используете Excel весь день каждый день, как я, то у вас, наверняка, открыто много рабочих книг одновременно. Я стараюсь дисциплинировать себя, но иногда это трудно. И в конце дня мы просто хотим закрыть все открытые рабочие тетради и пойти домой! Итак, этот пост содержит несколько советов по быстрому закрытию всех открытых файлов, чтобы помочь сократить трафик в час пик.

Содержание

  1. Совет № 1: Shift + кнопка закрытия окна
  2. Совет № 2: добавьте кнопку «Закрыть все» на панель быстрого доступа
  3. Совет № 3: Закройте все открытые книги с помощью макроса
  4. У вас есть свои советы по сохранению и закрытию файлов?

Совет № 1: Shift + кнопка закрытия окна

Самый
быстрый способ закрыть все открытые книги — это удерживать клавишу Shift,
нажимая кнопку «Закрыть окно». Кнопка «Закрыть окно» — это «х» в правом верхнем
углу окна приложения

Close All Excel Workooks Shortcut Shift Key Close Button

Если все открытые книги были сохранены, все они будут
закрыты.

Если какая-либо из открытых книг НЕ была сохранена, вам
будет предложено сохранить файл. Появится всплывающее окно, и вам придется
нажимать Сохранить или Не сохранять для каждой несохраненной книги.

Excel Warning Want to Save Changes Before Closing File Window Save All

Окно также содержит кнопку Сохранить все. Вы можете нажать эту кнопку, чтобы сохранить все несохраненные книги за один шаг.

Нажатие на кнопку «Отмена» отменит всю операцию, а все еще открытые книги останутся открытыми.

Но что, если мы не хотим сохранить все или некоторые из открытых рабочих книг? Мы вернемся к этому в совет № 3.

Совет № 2: добавьте кнопку «Закрыть все» на панель быстрого доступа

Мы также можем добавить кнопку «Закрыть все» на панель
быстрого доступа (QAT), чтобы закрыть все открытые книги. Это делает то же
самое, что и сочетание клавиш Shift + Close Window.

Excel Close All Button Quick Access Toolbar

Преимущество здесь в том, что мы можем использовать сочетание клавиш для нажатия кнопки. Доступ к кнопкам QAT можно получить с помощью сочетания клавиш, нажав клавишу Alt и номер, назначенный кнопке.

QAT Keyboard Shortcut to Close All Excel Files

Чтобы добавить кнопку «Закрыть все» в QAT, откройте окно параметров Excel («Файл»> «Параметры») и следуйте инструкциям на изображении ниже.

Add Close All But to Quick Access Toolbar in Excel Options

После нажатия кнопки «Закрыть все» нам будет предложено то же окно, как описано в совете № 1.

Бонусный совет: мы также можем использовать сочетание клавиш Ctrl + W, чтобы закрыть одну книгу. Я упомянул этот совет в своем посте по 17 ярлыкам Excel на 2017 год.

Press Ctrl W to Close Last Excel Workbook and Leave Application Open

Совет № 3: Закройте все открытые книги с помощью макроса

В этом разделе я поделюсь несколькими макросами, которые можно использовать для закрытия всех открытых рабочих книг. Макросы дают нам большую гибкость, когда мы хотим контролировать, какие книги сохраняются перед закрытием.

Макрос для закрытия всех книг без сохранения

Если мы не хотим сохранять какие-либо открытые файлы, мы
можем использовать следующий макрос.

Sub Close_All_Files_No_Save()
' Закройте все открытые книги и не сохраняйте

Dim wb As Workbook

  ' Просмотрите каждую рабочую книгу
  For Each wb In Application.Workbooks
    
    ' Предотвратить рабочую книгу, которая содержит
    ' код от закрытия
    If wb.Name <> ThisWorkbook.Name Then
      
      ' Закройте книгу и не сохраняйте изменения
      wb.Close SaveChanges:=False
    
    End If
  Next wb

End Sub

Как работает этот макрос?

Приведенный выше макрос просматривает все открытые книги на компьютере с помощью цикла For Next Loop. Он использует оператор If, чтобы проверить, является ли файл в цикле (wb.Name) НЕ (<>) файлом, который содержит код ThisWorkbook.Name.

Затем он использует метод Workbooks.Close (страница справки MSDN), чтобы закрыть книгу. Метод Close имеет необязательный параметр для SaveChanges. Мы можем установить значение True, чтобы сохранить изменения, и False, чтобы закрыть без сохранения.

Примечание. Этот макрос следует запускать только в том случае, если вы уверены, что не хотите сохранять изменения ни в одном из открытых файлов. Его нельзя отменить. Возможно, вы также захотите добавить окно сообщения Да / Нет, чтобы предупредить пользователя перед запуском этого макроса.

Макрос для сохранения всех, кроме новых несохраненных книг (блокнот)

В конце рабочего дня у меня обычно есть несколько книг, которые я хочу сохранить, и некоторые, которые я НЕ хочу сохранять. Я часто открываю новые рабочие книги, чтобы использовать файлы Excel для быстрых вычислений. Я называю их «блокноты». Я не хочу сохранять их, но хочу сохранить все другие открытые файлы.

Macro to Save and Close All Files Except New Unsaved Files

Файлы — блокноты никогда не сохранялись, поэтому они еще не имеют расширения. Они называются: Book1, Book2, Book2 и т.д. Обратите внимание, что на снимке экрана отсутствует расширение файла (.xlsx, .xlsm).

Таким образом, мы можем добавить оператор If в наш макрос, чтобы увидеть, существует ли расширение файла. Если расширение файла существует, то мы сохраним файл. Если нет, то мы закроем без сохранения.

Sub Save_and_Close_All_Files_Except_ScratchPads()
' Закройте все открытые книги, кроме новых несохраненных файлов

Dim wb As Workbook

  ' Просмотрите каждую рабочую книгу
  For Each wb In Application.Workbooks
    
    ' Предотвратить рабочую книгу, которая содержит
    ' код от закрытия
    If wb.Name <> ThisWorkbook.Name Then
      
      ' Проверьте, имеет ли имя файла расширение
      If InStr(Right(wb.Name, 5), ".xls") > 0 Then
        wb.Close SaveChanges:=True
      Else
        ' Не сохраняйте изменения, если это блокнот.
        wb.Close SaveChanges:=False
      End If
    
    End If
  Next wb

End Sub

Как работает этот макрос?

Этот макрос похож на макрос для закрытия всех книг. Разница
в том, что мы используем оператор If, чтобы проверить, имеет ли файл
расширение.

Функция Right используется для возврата 5 символов в конце
имени файла. Если wb — это существующий файл, который уже был сохранен, то
Right (wb.Name, 5) вернет «.xlsx» или «.xlsm».

Функция Instr (страница справки MSDN) используется для поиска строки в строке. Возвращает начальный номер строки. Таким образом, если Instr находит «.xls» в пределах «.xlsx» или «.xlsm», он возвращает 1. В противном случае он возвращает 0.

Оператор If проверяет, является ли возвращаемое значение из
Instr больше 0, и сохраняет изменения при закрытии книги. В противном случае
изменения не сохраняются для книг, которые НЕ содержат расширения.

Макрос для сохранения и закрытия всех книг и автоматического именования файлов

Иногда нам можем быть нужно сохранить некоторые из этих новых файлов (блокноты), но у нас нет времени, чтобы просмотреть каждый файл и сохранить его с именем.

Save and Close All Files and Auto Name New Files

Следующий макрос сохранит и закроет ВСЕ файлы и автоматически назовет новые файлы, которые не были сохранены. Он помещает все новые файлы (блокнот) в указанную вами папку.

Unsaved Files Save to a Folder and Automatically Named

Затем вы можете вернуться в эту папку, когда у вас будет свободное время для перемещения и переименования файлов.

Sub Save_and_Close_All_Files()
' Закройте все открытые книги, кроме новых несохраненных файлов

Dim wb As Workbook
Dim sPath As String

  ' Путь, где будут сохранены новые несохраненные файлы.
  ' Измените это на папку на вашем компьютере. Конец с обратной косой чертой 
  sPath = "C:UsersusernameDocumentsExcel CampusScratch Pads"

  ' Просмотрите каждую рабочую книгу
  For Each wb In Application.Workbooks
    
    ' Предотвратить рабочую книгу, которая содержит
    ' код от закрытия
    If wb.Name <> ThisWorkbook.Name Then
      
      ' Проверьте, имеет ли имя файла расширение
      If InStr(Right(wb.Name, 5), ".xls") > 0 Then
        wb.Close SaveChanges:=True
      Else
        ' Сохранить блокноты в папке
        wb.Close SaveChanges:=True, _
            Filename:=sPath & wb.Name & Format(Now, " yyyy-mm-dd-hhmm")
      End If
    
    End If
  Next wb

End Sub

Как работает этот макрос?

Этот макрос работает аналогично двум другим выше.
Единственное отличие состоит в том, что он сохраняет новые файлы (блокноты) в
папку на вашем компьютере.

Чтобы использовать этот макрос, вам нужно изменить
переменную sPath на папку на вашем компьютере. Обязательно заканчивайте строку
пути к файлу обратной косой чертой.

У метода Workbooks.Close есть еще один необязательный
параметр (Filename), который позволяет нам указать имя файла, в котором мы
хотим сохранить файл, если файл еще не был сохранен.

Если мы не используем параметр «Имя файла», Excel предложит
нам меню «Сохранить как» для каждого файла. Таким образом, указание имени файла
обходит это окно и может сэкономить нам много времени.

Значение параметра Filename объединяет строку для полного
пути к файлу. Он также изменяет текущую дату и время до конца имени файла,
используя функции «Формат» и «Сейчас». Функция Format в VBA аналогична функции
TEXT в Excel и позволяет нам указать числовой формат. Функция «Сейчас»
возвращает текущую дату и время на компьютере пользователя.

Я рекомендую добавить эти макросы в вашу личную книгу макросов, чтобы вы могли использовать их в любое время. Чтобы узнать больше, ознакомьтесь с моей статьей и видео о личной книге макросов.

У вас есть свои советы по сохранению и закрытию файлов?

Я надеюсь, что эти советы и макросы помогут вам закончить день немного быстрее. Есть ли у вас какие-либо другие советы по закрытию файлов? Пожалуйста, оставьте комментарий ниже с любыми предложениями или вопросами. Спасибо!

Как быстро закрыть все открытые книги?

Вы всегда можете работать с несколькими книгами Excel, а после рабочего дня захотите закрыть все открытые окна книги сразу. Обычно вы можете закрыть каждый файл отдельно, но это займет много времени и проблем, когда есть десятки открытых файлов Excel. Есть ли более простой способ немедленно закрыть их все?

Закройте все открытые книги с помощью кнопок Shift и Close

Закройте все открытые книги с помощью команды выхода

Закройте все открытые книги с помощью вкладки Office


стрелка синий правый пузырь Закройте все открытые книги с помощью кнопок Shift и Close

1. Открыв все книги, удерживайте нажатой клавишу Shift на клавиатуре, а затем щелкните значок Закрыть документ-закрыть-все-книги-1 в правом верхнем углу строки заголовка Excel, см. снимок экрана:

документ-закрыть-все-книги-2

2. Затем появится окно с запросом, хотите ли вы сохранить изменения в активной книге, см. Снимок экрана:

документ-закрыть-все-книги-2

3. Нажмите Сохраните все чтобы сохранить изменения всех книг и закрыть их все.

Внимание: Этот метод применяется к Excel 2007, 2010 и 2013.


стрелка синий правый пузырь Закройте все открытые книги с помощью команды выхода

1. В Excel 2007 и 2010 есть ExiКоманда t может помочь вам закрыть все открытые книги и выйти из окна Excel, нажмите Файл > Выход, затем нажмите Сохраните все в появившемся окне подсказки, чтобы сохранить все изменения и закрыть все окна Excel. Смотрите скриншоты:

2. Если у вас есть Excel 2013, Выход команда больше не остается, поэтому вы можете использовать Закройте все окна на панели задач, наведите указатель мыши на значок Excel на панели задач и щелкните его правой кнопкой мыши, затем щелкните Закрыть все окна во всплывающем меню см. снимок экрана:

документ-закрыть-все-книги-2


стрелка синий правый пузырь Закройте все открытые книги с помощью вкладки Office

Если вы установили Office Tab на вашем компьютере, это помогает вам просматривать и редактировать несколько файлов в одном окне с вкладками, чтобы узнать больше о вкладке Office и загрузить ее, нажмите здесь.

После установки Office Tabи откройте несколько книг, вы увидите, что все имена книг были отображены в одном окне с вкладками, как показано на следующем снимке экрана:

документ-закрыть-все-книги-2

Затем вы можете нажать кнопку Закрыть документ-закрыть-все-книги-1 в правом верхнем углу строки заголовка Excel, и появится всплывающее окно, напоминающее вам, если вы хотите Закрыть все вкладки или просто Текущая вкладка, выберите нужный вариант и нажмите, смотрите скриншоты:

Если вы щелкните Закрыть все вкладки, все открытые книги сразу закрываются.

Внимание: Вы также можете щелкнуть правой кнопкой мыши одно имя книги на панели вкладок и выбрать Закрыть все из контекстного меню, и все открытые книги были закрыты, но оставьте Excel открытым.

документ-закрыть-все-книги-2


Связанная статья:

Как быстро закрыть все книги, кроме активной?


Лучшие инструменты для работы в офисе

Kutools for Excel Решит большинство ваших проблем и повысит вашу производительность на 80%

  • Снова использовать: Быстро вставить сложные формулы, диаграммы и все, что вы использовали раньше; Зашифровать ячейки с паролем; Создать список рассылки и отправлять электронные письма …
  • Бар Супер Формулы (легко редактировать несколько строк текста и формул); Макет для чтения (легко читать и редактировать большое количество ячеек); Вставить в отфильтрованный диапазон
  • Объединить ячейки / строки / столбцы без потери данных; Разделить содержимое ячеек; Объединить повторяющиеся строки / столбцы… Предотвращение дублирования ячеек; Сравнить диапазоны
  • Выберите Дубликат или Уникальный Ряды; Выбрать пустые строки (все ячейки пустые); Супер находка и нечеткая находка во многих рабочих тетрадях; Случайный выбор …
  • Точная копия Несколько ячеек без изменения ссылки на формулу; Автоматическое создание ссылок на несколько листов; Вставить пули, Флажки и многое другое …
  • Извлечь текст, Добавить текст, Удалить по позиции, Удалить пробел; Создание и печать промежуточных итогов по страницам; Преобразование содержимого ячеек в комментарии
  • Суперфильтр (сохранять и применять схемы фильтров к другим листам); Расширенная сортировка по месяцам / неделям / дням, периодичности и др .; Специальный фильтр жирным, курсивом …
  • Комбинируйте книги и рабочие листы; Объединить таблицы на основе ключевых столбцов; Разделить данные на несколько листов; Пакетное преобразование xls, xlsx и PDF
  • Более 300 мощных функций. Поддерживает Office/Excel 2007-2021 и 365. Поддерживает все языки. Простое развертывание на вашем предприятии или в организации. Полнофункциональная 30-дневная бесплатная пробная версия. 60-дневная гарантия возврата денег.

вкладка kte 201905


Вкладка Office: интерфейс с вкладками в Office и упрощение работы

  • Включение редактирования и чтения с вкладками в Word, Excel, PowerPoint, Издатель, доступ, Visio и проект.
  • Открывайте и создавайте несколько документов на новых вкладках одного окна, а не в новых окнах.
  • Повышает вашу продуктивность на 50% и сокращает количество щелчков мышью на сотни каждый день!

офисный дно

Комментарии (0)


Оценок пока нет. Оцените первым!

 

Здравствуйте всем! Всех с прошедшим Днем Святого Валентина!
Имеется несколько окон проектов VBA (во вложении скриншот).
Как быстро их все закрыть можно, не закрывая каждое по отдельности?
Можно стандартными средствами, можно VBA.
Спасибо.

 

Пытливый

Пользователь

Сообщений: 4586
Регистрация: 22.12.2012

Здравствуйте. А даблклик по заголовку любого из окон — не подойдет?

Кому решение нужно — тот пример и рисует.

 

Дмитрий Щербаков

Пользователь

Сообщений: 14181
Регистрация: 15.09.2012

Профессиональная разработка приложений для MS Office

Вопрос: зачем? Чем мешают? Если не нравится обилие заголовков и вся эта «мельтешня» — просто разверните нужную окно на всю область окна редактора. Остальные скроются за ним и отображать их можно будет двойным щелчком мыши по нужному модулю.

Даже самый простой вопрос можно превратить в огромную проблему. Достаточно не уметь формулировать вопросы…

 

Все дело в том, что работа в проекте происходит на двух мониторах, в «растянутом окне». В одном — USerform, например, в другом — какой-нибудь модуль. После переключения на другой модуль окна начинают одно на одно налазить, уходит некоторое количество времени, чтобы снова их расставить, как надо.
Даблклик, конечно, решает, но тогда на два монитора одно окно будет. А нужно два. одновременно.

 

Дмитрий Щербаков

Пользователь

Сообщений: 14181
Регистрация: 15.09.2012

Профессиональная разработка приложений для MS Office

#5

16.02.2018 15:24:05

Могу предложить только код VBA:

Код
Sub CloseAllVBE_Windows()
    Dim vbp_w
    For Each vbp_w In ThisWorkbook.VBProject.VBE.Windows
        Select Case True
        Case Right(vbp_w.Caption, 6) = "(Code)", Right(vbp_w.Caption, 10) = "(UserForm)"
            vbp_w.Close
        End Select
    Next
End Sub

Даже самый простой вопрос можно превратить в огромную проблему. Достаточно не уметь формулировать вопросы…

 

Дмитрий, спасибо!
p.s. mz-tools старой бесплатной версии ни у кого не осталось?

 

Апострофф

Пользователь

Сообщений: 720
Регистрация: 06.04.2015

Нажать и не отпускать [Ctrl+F4] — пара секунд, и нет окон.

 

Не думала, что такие хоткеи предусмотрены.
Спасибо.

 

Anatoliy Pychev

Пользователь

Сообщений: 79
Регистрация: 05.09.2017

#9

16.02.2018 21:08:08

Цитата
Diana Tailor написал:
p.s. mz-tools старой бесплатной версии ни у кого не осталось?

с этим помогу

https://drive.google.com/open?id=13qyJElSlFUFCef0Z7J8SsEfJTpVMRrBV

Версия 3

 

ZVI

Пользователь

Сообщений: 4328
Регистрация: 23.12.2012

Надстройка

VBE Tools

добавляет такой пункт:
VBE — Window — Close All Document Windows
Но нужно помнить, что и эта надстройка, и MZTools — 32-битные и будут работать только в 32-битном Office

Изменено: ZVI16.02.2018 21:51:24

 

Kuzmich

Пользователь

Сообщений: 7998
Регистрация: 21.12.2012

#11

16.02.2018 22:15:50

Цитата
mz-tools старой бесплатной версии ни у кого не осталось?

http://excelvba.ru/soft/VBE
http://www.planetaexcel.ru/techniques/3/228/

Изменено: Kuzmich16.02.2018 22:20:31

 

Всем спасибо огромное за помощь!

 

khizhin62

Пользователь

Сообщений: 7
Регистрация: 15.12.2018

#13

14.11.2022 09:25:07

Апострофф

, спасибо — идеальное решение!!!

Bottom line: Learn a few shortcuts and tips to save and close all open Excel workbooks.

Skill level: Beginner

3 Tips to Save and Close All Files2

If you use Excel all day every day like I do, then it can be easy to have a lot of workbooks open at the same time.  I try to stay disciplined with this, but sometimes it’s hard.  And at the end of the day, we just want to close all open workbooks and go home!  So this post contains a few tips for quickly closing all open files to help beat rush hour traffic. 🙂

Tip #1: Shift + Close Window Button

The quickest way to close all open workbooks is to hold the Shift key while pressing the Close Window button.  The Close Window button is the “x” in the top-right corner of the application window.

Close All Excel Workooks Shortcut Shift Key Close Button

If all of the open workbooks have been saved, then they will all be closed.

If any of the open workbooks have NOT been saved, then you will be prompted to save the file.  The pop-up window will appear and you will have to press Save or Don’t Save for each unsaved workbook.

Excel Warning Want to Save Changes Before Closing File Window Save All

The window also contains a Save All button.  You can press this to Save All the unsaved workbooks in one step.

Clicking the Cancel button will cancel the entire operation and the wordbooks that are still open will remain open.

But what if we don’t want to save all or some of the open workbooks? We’ll get to that in tip #3.

Tip #2: Add the Close All Button to the Quick Access Toolbar

We can also add the Close All button to the Quick Access Toolbar (QAT) to close all open workbooks.  This does the same thing as the Shift+Close Window shortcut.

Excel Close All Button Quick Access Toolbar

The advantage here is that we can use a keyboard shortcut to press the button.  The QAT buttons can be accessed with a keyboard shortcut by pressing the Alt Key and the number assigned to the button.

QAT Keyboard Shortcut to Close All Excel Files

To add the Close All button to the QAT, open the Excel Options window (File>Options) and follow the steps on the image below.

Add Close All But to Quick Access Toolbar in Excel Options

After pressing the Close All button we will be prompted with the same window as described in tip #1.

Bonus Tip: We can also use the keyboard shortcut Ctrl+W to close a single workbook.  I mentioned this tip in my post on 17 Excel shortcuts for 2017.

Press Ctrl W to Close Last Excel Workbook and Leave Application Open

Tip #3: Close All Open Workbooks with a Macro

In this section I will share a few macros that can be used to close all open workbooks.  The macros give us a lot more flexibility when we want to control which workbooks are saved before closing.

You can download the Excel file that contains the macros here.

Macro to Close All Workbooks Without Saving

If we don’t want to save any of the open files, then we can use the following macro.

Sub Close_All_Files_No_Save()
'Close all open workbooks and don't save

Dim wb As Workbook

  'Loop through each workbook
  For Each wb In Application.Workbooks
    
    'Prevent the workbook that contains the
    'code from being closed
    If wb.Name <> ThisWorkbook.Name Then
      
      'Close the workbook and don't save changes
      wb.Close SaveChanges:=False
    
    End If
  Next wb

End Sub

How does this macro work?

The macro above loops through all of the open workbooks on the computer using a For Next Loop.  It uses an If statement to check if the file in the loop (wb.Name) is NOT (<>) the file that contains the code ThisWorkbook.Name.

It then uses the Workbooks.Close method (MSDN Help Page) to close the workbook.  The Close method has an optional parameter to SaveChanges.  We can set this to True to save changes, and False to close without saving.

Note: This macro should only be run if you are certain you don’t want to save changes to any of the open files.  There is no way to undo this.  You might also want to add a Yes/No Message Box prompt to warn the user before running this macro.

Macro to Save All Except New Unsaved Workbooks (Scratch Pads)

At the end of my workday I usually have a combination of some workbooks that I want to save, and some that I do NOT want to save.  I often open new workbooks to use the Excel files for quick calculations.  I call these “scratch pads”.  I don’t necessarily want to save these, but I might want to save all other open files.

Macro to Save and Close All Files Except New Unsaved Files

The scratch pad files have never been saved, so they don’t have a file extension yet.  They are named: Book1, Book2, Book2, etc.  Notice in the screenshot that there is no file extension (.xlsx, .xlsm).

So we can add an If statement to our macro to see if a file extension exists.  If the file extension exists, then we will save the file.  If not, then we will close without saving.

Sub Save_and_Close_All_Files_Except_ScratchPads()
'Close all open workbooks except new unsaved files

Dim wb As Workbook

  'Loop through each workbook
  For Each wb In Application.Workbooks
    
    'Prevent the workbook that contains the
    'code from being closed
    If wb.Name <> ThisWorkbook.Name Then
      
      'Check if the file names has an extension
      If InStr(Right(wb.Name, 5), ".xls") > 0 Then
        wb.Close SaveChanges:=True
      Else
        'Do not save changes if it's a scratch pad.
        wb.Close SaveChanges:=False
      End If
    
    End If
  Next wb

End Sub

How does this macro work?

This macro is similar to the macro to close all workbooks. The difference is we use an If statement to test if the file has an extension.

The Right function is used to return the 5 characters at the end of the file name.  If wb is an existing file that has already been saved, then Right(wb.Name, 5) will return “.xlsx” or “.xlsm”.

The Instr function (MSDN Help Page) is used to find a string within a string.  It returns the starting character number of the string.  So, if Instr finds “.xls” within “.xlsx” or “.xlsm”, it will return 1.  Otherwise, it will return a 0.

The If statement checks if the return value from Instr is greater than 0, and saves changes while closing the workbook.  Otherwise, changes are not saved for workbooks that do NOT contain an extension.

Macro to Save and Close All Workbook and Automatically Name Files

Sometimes we might want to save some of those new files (scratch pads), but don’t have time to go through each file and save it with a name.  This is like hitting the Excel eject button when we don’t want to lose any of our work.

Save and Close All Files and Auto Name New Files

The following macro will save and close ALL files, and automatically name the new files that have not been saved.  It puts all the new (scratch pad) files in a folder that you specify.

Unsaved Files Save to a Folder and Automatically Named

You can then go back to that folder when you have some free time to move and rename the files.

Sub Save_and_Close_All_Files()
'Close all open workbooks except new unsaved files

Dim wb As Workbook
Dim sPath As String

  'The path where the new unsaved files will be saved.
  'Change this to a folder on your computer.  End with a backslash 
  sPath = "C:UsersusernameDocumentsExcel CampusScratch Pads"

  'Loop through each workbook
  For Each wb In Application.Workbooks
    
    'Prevent the workbook that contains the
    'code from being closed
    If wb.Name <> ThisWorkbook.Name Then
      
      'Check if the file names has an extension
      If InStr(Right(wb.Name, 5), ".xls") > 0 Then
        wb.Close SaveChanges:=True
      Else
        'Save scratchpads in a folder
        wb.Close SaveChanges:=True, _
            Filename:=sPath & wb.Name & Format(Now, " yyyy-mm-dd-hhmm")
      End If
    
    End If
  Next wb

End Sub

How does this macro work?

This macro works similar to the other two above.  The only difference is that it saves the new files (scratch pads) to a folder on your computer.

To use this macro you will need to change the sPath variable to a folder on you computer.  Make sure to end the file path string with a back slash.

The Workbooks.Close method has another optional parameter (Filename) that allows us to specify a file name where we want to save the file, if the file has NOT been saved yet.

If we do not use the Filename parameter, then Excel will prompt us with the Save As menu for each file.  So, specifying the Filename bypasses this window and can save us a lot of time.

The value of the Filename parameter is concatenating the string for the full file path.  It is also amending the current date and time to the end of the file name using the Format and Now functions.  The Format function in VBA is similar to the TEXT function in Excel, and allows us to specify a number format.  The Now function returns the current date and time on the user’s computer.

I recommend adding these macros to your Personal Macro Workbook so you can use them anytime.  Checkout my article and video series on the personal macro workbook to learn more.

Free Webinar on Getting Started with Macros & VBA

If you are interested in learning more about macros, I’m currently running my free webinar called “The 7 Steps to Getting Started with Macros & VBA”.  It’s running all this week, and it’s absolutely free to register.

During the webinar I explain why you might want to learn VBA, and a lot of the basic coding concepts that will help you get started.  I jump into Excel and the VB Editor and walk through how to write and run our first macro.  Even if you have been using VBA for awhile, I’m sure you will learn some new tips.

Macros and VBA Webinar Banner - Join Me - 550x200

Click here to learn more and register for the webinar

What Are Your Tips for Savings & Closing Files?

I hope those tips and macros help you end the day a little quicker.  Do you have any other tips for closing files.  Please leave a comment below with any suggestions or questions.  Thank you!

When you’re working on multiple spreadsheets at a time in Microsoft Excel, closing them all one by one is wasted time you could have spent on another task. By altering your Windows taskbar’s settings, you can group all open Excel windows into one icon, enabling you to close all Excel windows at the same time. Before closing, be sure to save your work in the open spreadsheets to prevent data loss and speed up the closing process.

  1. Right-click the Window’s taskbar while in Desktop Mode. Select «Properties» from the resulting menu.

  2. Click the drop-down menu beside «Taskbar Buttons.» Select the «Always Combine, Hide Labels» option. Click «Apply» and then «OK.»

  3. Right-click the taskbar’s Excel icon. Select the «Close All Windows» option. If you saved your work after editing the documents, they’ll close without asking you if you want to save.

Понравилась статья? Поделить с друзьями:
  • Class module vba excel что это такое
  • Class in french the word
  • Clara is having a lesson choose the right word
  • Civilization history of word
  • Civil engineering word dictionary