2

I heard a lot that using Select should be avoided as it slows code.
on the below code I want to freeze panes for the first two rows and I did not find any way to not using Select.

Sub Freeze_first_two_rows()
 
    ActiveWindow.FreezePanes = False
 
    ActiveSheet.Rows(3).Select
 
    ActiveWindow.FreezePanes = True
 
End Sub
Waleed
  • 788
  • 1
  • 2
  • 14
  • 1
    Does this answer your question? [excel vba freeze pane without select](https://stackoverflow.com/questions/34094445/excel-vba-freeze-pane-without-select) – ouroboros1 May 29 '22 at 11:51
  • @ouroboros1 ,I tried your suggestion but beside it freezes panes it also split the active window and that is not my need – Waleed May 29 '22 at 12:24

0 Answers0