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?


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

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!
officetab bottom
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 · 5 years ago
    I tried this in my workbook and it worked very well.

    thanks
  • To post as a guest, your comment is unpublished.
    Orchid · 5 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