none
Enable Freeze Panes RRS feed

  • Question

  • I support a very old company Excel spreadsheet and never upgraded from Excel 1999-2003.  The company recently upgraded to Office 2013 and the upgrade 'broke' the spreadsheet.  It can no longer set Freeze Panes without an abend.  One of the things that I have noticed is that the Freeze Panes icon on the View tab is now dithered.  
    While I have several issues to chase here, my immediate question is how to programatically check for and 'enable' (for lack of better term) that Freeze Panes functionality in order to get this spreadsheet up and running again?

    Thank you...

    Thursday, August 4, 2016 2:26 PM

Answers

  • Hi bluefin56,

    you had asked,"how to programatically check for and 'enable' (for lack of better term) that Freeze Panes functionality "

    Following is the example.

    Sub dem()
    Worksheets("Sheet1").Activate
    If ActiveWindow.FreezePanes = False Then
    ActiveWindow.FreezePanes = True
    MsgBox ("Freezepanes are Activated Now")
    Else
    MsgBox ("Freezepanes are already Activated")
    End If
    End Sub
    

    please visit the link below to get more information regarding Freeze panes.

    Window.FreezePanes Property (Excel)

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 5, 2016 4:22 AM
    Moderator

All replies

  • Hi bluefin56,

    you had asked,"how to programatically check for and 'enable' (for lack of better term) that Freeze Panes functionality "

    Following is the example.

    Sub dem()
    Worksheets("Sheet1").Activate
    If ActiveWindow.FreezePanes = False Then
    ActiveWindow.FreezePanes = True
    MsgBox ("Freezepanes are Activated Now")
    Else
    MsgBox ("Freezepanes are already Activated")
    End If
    End Sub
    

    please visit the link below to get more information regarding Freeze panes.

    Window.FreezePanes Property (Excel)

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 5, 2016 4:22 AM
    Moderator
  • Thank you Deepak.  My apologies for a less that adequate question...

    On further testing and just plain poking at the problem, the issue isn't so much the FreezePanes functionality but rather with Sheet and/or Workbook Protection.  It would appear that specifically, the Workbook Unprotect method isn't 'working' when it tries to unprotect the workbook when it has been protected using the Windows argument.  The second potential issue I may have is the sequence in which the workbook and worksheet protection happens.

    My current plan of attack is to remove the Windows argument from all the workbook protection.

    My specific question is how do I get an already 'window protected' workbook to give up its' 'window protection' and allow me to successfully apply the FreezePanes property?

    Thank you...

    Wednesday, August 17, 2016 11:58 AM
  • Hi bluefin56,

    I think it is better if you post some code here with that you are facing a problem.

    so that I can try to give you suggestion more accurately.

    you had asked,"how do I get an already 'window protected' workbook to give up its' 'window protection' and allow me to successfully apply the FreezePanes property?"

    if I understand correctly your question then you want already protected workbook?

    you can set the protection by code like below.

    Sub ProtectSheet() ActiveSheet.Protect "password", True, True End Sub Sub UnProtectSheet() ActiveSheet.Unprotect "password" End Sub Sub demo1() ActiveWindow.FreezePanes = True End Sub

    Sub protectworkbook()
    ActiveWorkbook.Protect Structure:=True, Windows:=False, Password:="abc"

    End Sub

    if I understand something wrong then correct me.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, August 18, 2016 2:38 AM
    Moderator
  • I think I have my problem resolved.  The fundamental problem lay with how the Workbook Protection method was being used.  The existing code was using the argument of Windows:=True.  Apparently, that functionality has been deprecated someplace along the line.  When I changed the argument to Windows:=False, I no longer was getting the protection error when I tried to do excute the FreezePanes method.

    Thank you again Deepak...

    Friday, August 19, 2016 4:48 PM