I would like to replicate the Unfreeze Panes function using a VBA code. In other words
View >UnFreeze Panes > (All Rows and Columns)
However I only need this to apply for 2 specific worksheets in my workbook.
My workbook has multiple worksheets which currently has a VB code in TheWorkbook which applies the Freeze Panes to my entire workbook and I need to Unfreeze Panes (with an event procedure) in specific worksheets, but not the entire workbook.
I’ve recorded a Macro which works when I run it, but I haven’t been able to make run (automatically) as an Event Procedure and so far the codes I’ve found don’t seem to be working for me
. The Recorded Macro Code I'm using is:
Sub UnfreezeCPanel()
'
' UnfreezeCPanel Macro
'
'
ActiveWindow.FreezePanes = False
ActiveWindow.SplitRow = 0
End Sub
I’m a VBA noobie so some help solving this issue (including a little instruction, i.e. where to place the code – I’m guessing it would go in the actual VBA Worksheets) would be greatly appreciated.
Thanks in advance
View >UnFreeze Panes > (All Rows and Columns)
However I only need this to apply for 2 specific worksheets in my workbook.
My workbook has multiple worksheets which currently has a VB code in TheWorkbook which applies the Freeze Panes to my entire workbook and I need to Unfreeze Panes (with an event procedure) in specific worksheets, but not the entire workbook.
I’ve recorded a Macro which works when I run it, but I haven’t been able to make run (automatically) as an Event Procedure and so far the codes I’ve found don’t seem to be working for me

Sub UnfreezeCPanel()
'
' UnfreezeCPanel Macro
'
'
ActiveWindow.FreezePanes = False
ActiveWindow.SplitRow = 0
End Sub
I’m a VBA noobie so some help solving this issue (including a little instruction, i.e. where to place the code – I’m guessing it would go in the actual VBA Worksheets) would be greatly appreciated.
Thanks in advance
