visual basic excel freeze first row

Visual Basic Excel: Freeze First Row

To freeze the first row in Excel using Visual Basic, you can use the following VBA code:

Sub FreezeFirstRow()
    Rows("2:2").Select
    ActiveWindow.FreezePanes = True
End Sub

This code selects the second row and freezes the panes, effectively freezing the first row.

[[SOURCE #1]]