Can I find out if & where "Freeze Panes" is set

G

Guest

From within a macro I would like to be able to determine if "Freeze Panes"
is set for a worksheet and, if so, exactly which rows/columns are frozen.
Is that possible? How?

Thanks!!
 
A

Andy Pope

Hi,

Sub Macro1()
'
If ActiveWindow.FreezePanes Then
MsgBox "Freeze panes are on"
Else
MsgBox "No Freeze panes"
End If

MsgBox Cells(ActiveWindow.ScrollRow, _
ActiveWindow.ScrollColumn).Address

End Sub

Cheers
Andy
 
J

JLGWhiz

This will tell you the column and row that is frozen if any.

Sub fndfrz()
If ActiveWindow.FreezePanes = True Then
MsgBox "Column: " & ActiveWindow.SplitColumn & ", _
Row: " & ActiveWindow.SplitRow
End If
End Sub
 
J

JLGWhiz

P.S. These codes only tell you the window row and column positions that are
frozen, NOT necessarily the sheet row and column.
 
A

Andy Pope

I see that my code actually returns the visible Top left cell within the
frozen panes.

Cheers
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top