Data Tools · VBA
Freeze Headers on All Sheets
Freeze the top row on every worksheet at once.
- Freezes row 1 everywhere
- One run for the whole workbook
' Freezes the top row on every worksheet at once.
Sub FreezeHeaderAllSheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Activate
ws.Range("A2").Select
ActiveWindow.FreezePanes = True
Next ws
ThisWorkbook.Worksheets(1).Activate
End Sub
Free to use and modify · ExcelBot — excelempowers.com
Loops through all worksheets and freezes the header row (row 1) on each.
How to install:
- Open your workbook and press Alt + F11 to open the VBA editor.
- Choose Insert ▸ Module and paste the code (or File ▸ Import File for the .bas).
- Press F5 to run, or run it from Developer ▸ Macros.
- Save your file as .xlsm (macro-enabled) to keep the macro.
No VBA? In ExcelBot you can do the same thing by just asking the AI in plain language.
freeze panes
headers
all sheets
congelar
encabezados
Rather not use VBA?
In ExcelBot you get the same result by asking the AI in plain language — no macros needed.
Try ExcelBot free Browse more macros