determine if column is frozen with vba

B

Bob Phillips

frozen? what does that mean?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
G

Guest

Bob Phillips said:
frozen? what does that mean?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

frozen panes


If ActiveWindow.Panes.Count = 1 then panes are not frozen
 
B

Bob Phillips

And how does that relate to columns? You want if the columns are inside the
frozen area? What if part of them are?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
N

NickHK

This should get you started :

Private Function ColumnInFrozenPane(TestColumn As Long, argWnd As Window) As
Boolean
Dim i As Long

ColumnInFrozenPane = False

With argWnd
If .FreezePanes = True And .Panes.Count > 1 Then
For i = 1 To .Panes.Count
If .Panes(i).ScrollColumn > 1 Then
ColumnInFrozenPane = (TestColumn < .Panes(i).ScrollColumn)
Exit Function
End If
Next
End If
End With

End Function

You can expand it to include row instead and allow for more than single
column/row.

NickHK
 

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