Freezepanes

R

Russ

Is it possible to freezepanes without having to first select the cell where
you want the freeze to take place?
 
R

Rick Rothstein

Yes, just replace my example row and column values with the one's you
need)...

With ActiveWindow
.SplitColumn = 4
.SplitRow = 7
.FreezePanes = True
End With

Note: Without the FreezePanes = True statement, the worksheet will be Split
instead of frozen.
 
J

Jim Thomlinson

Freeze panes is one of the very few palces in the workd where, yes you do
need to select the cell. Also make sure you remove the freeze panes prior to
trying to apply it otherwise you can run into an error.

Another place you need to actually select the cell is on conditional
formatting...
 
R

Russ

Hi Jim,
Rich Rothstein's suggestion seems to work. It does not require selecting
anything in the window.
 
J

Jim Thomlinson

Always good to learn something new... I have seen dozens of replies to
questions on freeze panes and none of them used the split property...
 
R

Rick Rothstein

The best I could tell, Split and Freeze are basically the same thing
underneath it all, the difference being whether you can adjust the location
of the split panes or not, and FreezePanes seems to be the toggle between
those two modes.
 
Top