How to apply freeze / unfreeze panes to multiple worksheets at once?
Supposing you have a large workbook which contains hundreds of worksheets, and now you need to apply the Freeze Panes to freeze all of the worksheets at once. With Excel’s Freeze Panes function, you can just freeze only one worksheet at a time, is there a way to freeze or unfreeze all worksheets immediately at once in Excel?
Apply Freeze Panes to all worksheets at once with VBA code
Apply Unfreeze Panes to all worksheets at once with VBA code
Apply Freeze / Unfreeze Panes to all worksheets at once by one click with Kutools for Excel
Apply Freeze Panes to all worksheets at once with VBA code
You can use the following code to apply the Freeze Panes to all worksheets, please do with following steps:
1. If you want to freeze all worksheets in the same position, select a cell that you want to freeze in the worksheet, and then hold Shift key to select all sheet tabs.
2. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
3. Click Insert > Module, and paste the following code in the Module Window.
VBA code: Freeze all worksheets at once in Excel
Sub Freeze()
'Updateby Extendoffice
Dim Ws As Worksheet
Application.ScreenUpdating = False
For Each Ws In Application.ActiveWorkbook.Worksheets
Ws.Activate
With Application.ActiveWindow
.FreezePanes = True
End With
Next
Application.ScreenUpdating = True
End Sub
4. And then press F5 key to run this code, and all the worksheets have been applied with the freeze panes in the same position.
Note: If all the worksheets are not selected and the active cells of each worksheet are located in different positions, the freeze panes will in the different places as the active cells on.
Apply Unfreeze Panes to all worksheets at once with VBA code
If there are multiple worksheets are applied with the freeze panes in your Excel, how could you unfreeze them at a time except unfreezing them one by one?
1. Launch your workbook which worksheets have been applied with the freeze panes.
2. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
3. Click Insert > Module, and paste the following code in the Module Window.
VBA code: Unfreeze all worksheets at once in Excel
Sub UnFreeze()
'Updateby Extendoffice
Dim Ws As Worksheet
Application.ScreenUpdating = False
For Each Ws In Application.ActiveWorkbook.Worksheets
Ws.Activate
With Application.ActiveWindow
.FreezePanes = False
End With
Next
Application.ScreenUpdating = True
End Sub
4. And then press F5 key to run this code, and all the worksheets that applied with the freeze panes have been unfrozen at once.
Apply Freeze / Unfreeze Panes to all worksheets at once by one click with Kutools for Excel
If you are not familiar with the VBA codes, here is a powerful tool- Kutools for Excel, its Freeze panes multiple worksheets and Unfreeze panes multiple worksheets utilities can help you to freeze or unfreeze all worksheets of current workbook at once.
Note:To apply this Freeze panes multiple worksheets, firstly, you should download the Kutools for Excel, and then apply the feature quickly and easily.
After installing Kutools for Excel, please do as this:
1. Select a cell where you want to apply the freeze pane for all worksheets, in this case, I click cell B2, see screenshot:
2. Then click Kutools Plus > Worksheet > Freeze panes multiple worksheets, see screenshot:
3. And then all of your worksheets have been applied the freeze panes in the same position of cell B2.
Note: If you want to unfreeze them immediately, you just need to apply the Unfreeze panes multiple worksheets feature by clicking Kutools Plus> Worksheet > Unfreeze panes multiple worksheets.
Download and free trial Kutools for Excel Now !
Demo: Apply Freeze / Unfreeze Panes to all worksheets at once by one click with Kutools for Excel
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!