VBA – Freeze Panes
Written by
Reviewed by
Last updated on June 27, 2023
Freeze Panes Using VBA
I recently posted on Freezing panes in Excel, here’s how you can do it using VBA:
Freeze Rows
Rows("1:1").Select
ActiveWindow.FreezePanes = True
Freeze Columns
Range("A:A").Select
ActiveWindow.FreezePanes = True
Freeze Rows and Columns
Range("B2").Select
ActiveWindow.FreezePanes = True
UnFreeze Panes
ActiveWindow.FreezePanes = False
VBA Coding Made Easy
Stop searching for VBA code online. Learn more about AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!