VBA Event Procedure Code – To Unfreeze Panes in Specific Worksheets

Status
Not open for further replies.

wcm69

Board Regular
Joined
Dec 25, 2016
Messages
112
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:confused:. 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 :)
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Status
Not open for further replies.

Forum statistics

Threads
1,223,248
Messages
6,171,027
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top