PC Review


Reply
Thread Tools Rate Thread

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

 
 
NoSpam@aol.com
Guest
Posts: n/a
 
      5th Jan 2008
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!!
 
Reply With Quote
 
 
 
 
Andy Pope
Guest
Posts: n/a
 
      5th Jan 2008
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

(E-Mail Removed) wrote:
> 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!!


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      5th Jan 2008
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



"Andy Pope" wrote:

> 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
>
> (E-Mail Removed) wrote:
> > 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!!

>
> --
>
> Andy Pope, Microsoft MVP - Excel
> http://www.andypope.info
>

 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      5th Jan 2008
P.S. These codes only tell you the window row and column positions that are
frozen, NOT necessarily the sheet row and column.

"Andy Pope" wrote:

> 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
>
> (E-Mail Removed) wrote:
> > 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!!

>
> --
>
> Andy Pope, Microsoft MVP - Excel
> http://www.andypope.info
>

 
Reply With Quote
 
Andy Pope
Guest
Posts: n/a
 
      5th Jan 2008
I see that my code actually returns the visible Top left cell within the
frozen panes.

Cheers
Andy

Andy Pope wrote:
> 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
>
> (E-Mail Removed) wrote:
>
>> 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!!

>
>


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
freeze panes in "save as web page" jcy Microsoft Excel Discussion 3 23rd Sep 2009 06:07 AM
Print "freeze panes" on succeeding pages? =?Utf-8?B?a2RoZWxt?= Microsoft Excel Misc 8 10th Oct 2008 12:38 AM
"Freeze panes" settings lost after opening file in two windows omccreary@nyc.rr.com Microsoft Excel Discussion 1 17th Feb 2008 05:12 PM
I want to lock row 1 in Excel. Why is "Freeze Panes" grayed out? Fran Z Microsoft Excel Misc 2 15th Jan 2008 05:46 PM
Excel loses "Freeze Panes" setting =?Utf-8?B?RXJpYw==?= Microsoft Excel Misc 1 3rd Nov 2006 12:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:13 PM.