Unhide All Worksheets in a Workbook

If you want to unhide all Worksheets in a Workbook at once, this simple macro makes easy work for you. VBA Code Sub UnhideAllWorksheets() ‘Step 1: Declare your variables Dim ws As Worksheet ‘Step 2: Start looping through all worksheets For Each ws In ActiveWorkbook.Worksheets ‘Step 3: Loop to next…

Delete All Worksheets Except Active One

Sometimes, you may want to delete all Worksheets except the active one, if the Workbook have many Worksheets, it seems very boring to do it manually. In these situations, you can use this simple macro. VBA Code Sub DeleteAllWorksheetsExceptActive() ‘Step 1: Declare your variables Dim ws As Worksheet ‘Step 2:…

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…

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…