VBA Freeze Panes at Specific Row and Column

Answered

I would like to freeze first row and fifth column in a worksheet, how can i do it using VB. It will be great if you could give a code.

Top Contributor Asked on February 23, 2017 in VBA: Macros.
Add Comment
1 Answer(s)
Best answer

Hi,

Here is the VBA code to set the Freeze Panes at Range F2. i.e; at Row 2 and Column 6 (This will freeze the Column 1 and Column 5).

Sub sb_VBAF1_FreezePanes()
Range("F2").Select
ActiveWindow.FreezePanes = True
End Sub

Thanks!

Expert Answered on February 23, 2017.
Add Comment
  • Found this useful?

    Please share using the share button above.

    If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.

    Found the answer useful and wants to credit the user, then vote the answer (vote up).

  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.