Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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 / unfreeze panes to multiple worksheets:

Kutools for Excel’s Freeze / Unfreeze panes multiple worksheets can help you freeze or unfreeze all worksheets within your workbook with one click.

doc freeze multiple sheets 1

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!



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()
'Update 20140317
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.


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()
'Update 20140317
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.


If you are not familiar with the VBA codes, here is a powerful tool- Kutools for Excel, its Freeze panes multiple worksheet and Unfreeze panes multiple worksheets utilities can help you to freeze or unfreeze all worksheets of current workbook at once.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. 

If you have installed kutools for Excel, please do as follows:

1. Select a cell where you want to apply the freeze pane for all worksheets, in this case, I click cell B2, see screenshot:

doc freeze all sheets 1-1

2. Then click Enterprise > Worksheet > Freeze panes multiple worksheets, see screenshot:

doc freeze all sheets 2-2

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 Enterprise > Worksheet > Unfreeze panes multiple worksheets.

Download and free trial Kutools for Excel Now !


Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!


Related article:

How to Freeze Panes in Excel?


Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    JD · 3 years ago
    want to be able to freeze top row on multiple worksheets
  • To post as a guest, your comment is unpublished.
    Kurt · 4 years ago
    I tried this in my workbook and it worked very well.

    thanks
  • To post as a guest, your comment is unpublished.
    Orchid · 4 years ago
    dear all,
    I have a test in my workbook, have a good note that before you apply this macro, please move the mouse to the cell that you need to apply freeze pane in the sheet.
    it's really helpful. this info is what I am looking for.
    thank you very much
    Lan