Add and Name a New Worksheet with Specific Name

If you always add and name a new Worksheet with specific name in your Workbook, sometimes it seems very boring to do it manually. This simple macro can help you. VBA Code Add and Name a New Worksheet with Current Date Sub AddAndNameWithCurrentDate() ‘Step 1: Tell Excel what to do…

Excel VBA: Change Calculation Mode To Manual

Sub WorkbookCalculationManual() With Application ‘Workbook calculation settings .Calculation = xlCalculationManual ‘Change calculation mode to manual ‘.CalculateBeforeSave = True ‘Recalculate workbook before saving, if saving a workbook takes a long time, set to False. ‘.Calculation = xlCalculationAutomatic ‘Change calculation mode to automatic ‘.Calculation = xlCalculationSemiautomatic ‘Automatic except for data tables ‘Iterative…

Create a Backup of a Workbook with Current Date

We all know that making backups of your work is important. Now you can have a macro do it for you. This simple macro can backup your workbook with today’s date as part of the file name in the Same folder. Macro Code (VBA Code) Sub Backup() ‘Step 1: Create a…

Prevent the Workbook Closing If a Cell is Empty

Sometimes you may not want a user closing out a workbook without entering a specific piece of data. In these situations, you want Excel to prevent the user from closing or saving a file if certain cells are empty. you want to to make sure the user has entered all…

Print All Workbooks in a Folder

Sometimes you may need to print all workbooks in a folder, open each workbook, print, close the workbook, and then open the next one. Opening and printing each workbook in a folder is typically a time consuming manual process. This little macro takes care of that annoyance. Macro Code (VBA…

Open All Workbooks in a Folder

Sometimes you may need to go into your folder, open each workbook, edit, save it, close the workbook, and then open the next one. Opening each workbook in a folder or directory is typically a time consuming manual process. This little macro takes care of that annoyance. Macro Code (VBA…

Save and Close All Workbooks at Once

Sometimes you may need to save and close many workbooks at once. For each workbook you have opened, you need to activate the work, close it, and confirm save changes. There is no easy way to close them all down at one time. This little macro takes care of that…

Refresh All Data Connections on Workbook Open

Your workbook may have connections to external data sources such as web queries, MSQuery connections, PivotTable connections, and so on. In these cases, it may be helpful to refresh all data connections automatically when the workbook is opened. The following macro code allows you to refresh all data connections on…