Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default Can I find out if & where "Freeze Panes" is set

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!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Can I find out if & where "Freeze Panes" is set

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

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Can I find out if & where "Freeze Panes" is set

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

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Can I find out if & where "Freeze Panes" is set

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

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Can I find out if & where "Freeze Panes" is set

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

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple "Freeze Panes" one one worksheet Frustrated Word User[_5_] Setting up and Configuration of Excel 2 November 6th 09 02:34 PM
Print "freeze panes" on succeeding pages? kdhelm Excel Discussion (Misc queries) 8 October 10th 08 12:38 AM
I want to lock row 1 in Excel. Why is "Freeze Panes" grayed out? Fran Z Excel Discussion (Misc queries) 2 January 15th 08 05:46 PM
"freeze panes" in excel '97? Jolanda van Tuijl New Users to Excel 1 November 10th 06 12:02 PM
Excel loses "Freeze Panes" setting Eric Excel Discussion (Misc queries) 1 November 3rd 06 12:21 AM


All times are GMT +1. The time now is 12:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"