Detecting frozen rows in Basic

I would like to be able to find out if a row in a spreadsheet is currently “frozen”. Obviously this information must be stored somewhere since it is persistent across save/open. I’ve used the debugger to search through the ScCellObj and the ScTableSheetObj but have yet to find any hints.

Help, please? Thanks in advance.

Try this:

Sub ShowFrozenRowCol()
  Dim oContr as Object, s as String
  oContr = ThisComponent.CurrentController
  With oContr
    If .hasFrozenPanes Then
      s = "Active sheet frozen:"
      If .SplitRow > 0 Then s = s & " row " & (.SplitRow - 1)
      If .SplitColumn > 0 Then s = s & " column " & .SplitColumn
    Else
      s = "There are no frozen rows or columns on the active sheet"
    End If
    Msgbox s  
  End With 
End Sub
1 Like

Ah … SplitRow and SplitColumn. Many thanks: this does exactly what I had in mind.

→ boolean hasFrozenPanes()