How to lock all the column headers in Excel

Hi All,

I’m using an Excel file that contains 3 sheets, I’m trying to Lock the Column Headers in 1st sheet. Lock the entire 3rd sheet

How to do it using UiPath? I also want to consider using the VB script if it saves time. Please help
Thanks in advance

1 Like

Hi @harini1702 ,

You can use the below VBA to Freeze the Panes

Sub Freeze_Panes()
'first, ensure that no panes are frozen ActiveWindow.FreezePanes = False 'select the row that you want to freeze based on' Rows(“3:3").select’freeze panes
ActiveWindow.FreezePanes = True
End Sub

For More Details Refer :

Next All you all have to do is Invoke this VBA in UiPath .
Below 2 videos will guide you how to use VBA -