hi, i am trying to freeze the top row of a given worksheet. I recorded a macro to see how to do it and this is what it gives me.
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1
End With
ActiveWindow.FreezePanes = True
I replaced the "activewindow" with
workbooks(fl_name).worksheets(1)
but it does not work.
So i used this
fl_name = ThisWorkbook.Name
Set ws1 = Workbooks(fl_name).Worksheets("Quality Compliance")
ws1.Rows("1:1").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1
End With
ActiveWindow.FreezePanes = True
While this did work.........froze top row............but it also split the top row. So i could not simply unfreeze the top row.
Is there a better way to freeze the top row?
Bookmarks