freeze cell B1

N

nikolaosk

hi folks.


when you want a particular column(let's say column A of a worksheet) to
appear all teh time on screen even if you scroll right on a worksheet
is to go to cell B1 and then go to the top-level menu "window" and hit
the "freeze panes"option.


i found out that excel uses the freezpanes property.
the property is as you see below.

Workbooks("BOOK1.XLS").Worksheets("Sheet1").Activate
ActiveWindow.FreezePanes = True


i was asked to check if the user has applied freezpanes on the cell B1
of the worksheet.

is that possible or freezpanes work for activewindow only?


i ideally looking for something like this:

Workbooks("BOOK1.XLS").Worksheets("Sheet1").range("b1").freezpanes=true
-if something like this exists



is there any workaround to check that the user has applied freezpanes
on the cell B1 of the worksheet?


thanks
 
T

Tom Ogilvy

Sub TestFreezePanes()
Worksheets("Sheet1").Activate
Range("A1").Select
If ActiveWindow.FreezePanes Then
If ActiveWindow.VisibleRange(1).Address <> "$A$1" Then
MsgBox "Windows frozen at cell: " & _
ActiveWindow.VisibleRange(1).Address
End If
End If
End Sub
 

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