+ Reply to Thread
Results 1 to 10 of 10

VB Code to freeze pane

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to freeze pane

    Hello:

    Please refer to attached file.
    I need VB Code to do following.
    I have monthly sheet Jan,Feb....Dec
    Cell A42 of each sheet have text "End".
    i would need Cell A42 to be the 1st row as shown in Jan sheet
    I need VB Code to Freeze Pane right below row 42 when I land at particular sheet.
    I have manually done this for Jan as you can see.
    So now i need to Freeze pane if i go to "Feb" Sheet.
    Let me know if you have any questions.

    I am using below code but still need "End" to be shown as 1st row in excel

    Please Login or Register  to view this content.
    Thanks.

    Riz
    Attached Files Attached Files
    Last edited by rizmomin; 01-19-2018 at 12:53 PM.

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: VB Code to freeze pane

    Try this code in a ThisWorkbook module
    Please Login or Register  to view this content.
    Rizmomin-vb-code-to-freeze-pane-book3.xlsm
    Select a sheet to see the code run.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to freeze pane

    Hello gmr:

    Thanks a lot for your help.
    However, when i manually UnFreeze Pane, it does show row 1 thru 42
    Can you please check
    Thanks

    Riz

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: VB Code to freeze pane

    Sorry about that...try this
    Rizmomin-vb-code-to-freeze-pane-book3 V2.xlsm

  5. #5
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to freeze pane

    Hello gmr:

    Its still same.
    I am UNfreezing manually to go to row1 but i cannot
    Riz

  6. #6
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: VB Code to freeze pane

    Sorry, thought you wanted not to see 1 through 42 when unfrozen. Try this..
    Rizmomin-vb-code-to-freeze-pane-book3 V3.xlsm
    After you unfreeze the panes, click in the sheet and rows 1 through 42 will unhide.

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VB Code to freeze pane

    Maybe:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  8. #8
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to freeze pane

    Hello gmr:

    Thanks a lot, seems to work...

    xladept : i will also try your solution but thanks for great help.

    Riz

  9. #9
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: VB Code to freeze pane

    You're welcome, thank you for the rep.

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VB Code to freeze pane

    Hi Riz,

    You're welcome and thanks for the rep!

    *Let me know if it's what you wanted.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Freeze Pane Help
    By mhitomi_7 in forum Excel General
    Replies: 1
    Last Post: 01-14-2016, 12:20 PM
  2. [SOLVED] freeze pane in VBA
    By cmccabe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2014, 10:04 AM
  3. Freeze pane
    By BadgerMK in forum Excel General
    Replies: 0
    Last Post: 09-14-2006, 09:11 AM
  4. Freeze pane
    By Nick London in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-04-2006, 07:10 AM
  5. Freeze pane
    By Marisa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-11-2006, 07:55 AM
  6. [SOLVED] Freeze pane
    By CraigMc in forum Excel General
    Replies: 2
    Last Post: 09-05-2005, 10:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1