+ Reply to Thread
Results 1 to 10 of 10

Scroll then freeze

Hybrid View

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Excel 2007
    Posts
    5

    Scroll then freeze

    I'm making a worksheet, I would like the user to be able to scroll down as normal, but as the user scrolls past the 10th row, it freezes on the top

    I dont know a darn thing about macros, VBA or how to make or apply them.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Scroll then freeze

    Hi Neufy16,

    Welcome to the forum.

    Is it not the windows freeze option that you are looking for ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    07-25-2012
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Scroll then freeze

    windows freeze option? im not too sure what that is.

    ---------- Post added at 11:33 PM ---------- Previous post was at 11:31 PM ----------

    when I use the tradition freeze options, it will put the freeze on row 10 thus freezing rows 1 through 10 on the top

    as the user scrolls down, I want rows 1-9 to scroll up off the screen then 10 becomes frozen on the top of the screen

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Scroll then freeze

    Okay.. so you want only row 10 to be freezed (like a heading) as soon as users reaches row 10 ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  5. #5
    Registered User
    Join Date
    07-25-2012
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Scroll then freeze

    yes, exactly what I need. thanks for the quick response

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Scroll then freeze

    Hi Neufy16,

    Scroll and freeze are different features though I have provided codes for both

    See attached workbook as sample :-Freeze & scroll lock.xlsm

    Open the attached workbook and scroll down using arrow keys. The moment you'll try to pass row 10, it will freeze.
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If ActiveCell.Row = 11 Then
    Rows("11:11").Select
    ActiveWindow.FreezePanes = True
    End If
    End Sub
    For Scroll lock, you can use below code in any standard module. See the instructions given in the code itself and play around
    Sub scrollock()
    
    ' To lock scoll area for row # 10
    Worksheets("sheet1").ScrollArea = "10:10"
    
    ' To lock scoll area from row 1 to row  10
    Worksheets("sheet1").ScrollArea = "1:10"
    
    'To unlock any scroll area :-
    Worksheets("sheet1").ScrollArea = ""
    
    End Sub

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  7. #7
    Registered User
    Join Date
    07-25-2012
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Scroll then freeze

    where do I put this code? I have no idea what this means... how do I apply?

    Also that workbook just freezes rows 1 through 10,

    As the user scrolls down, rows 1 through 9 need to scroll off the screen and as we scroll past row 10, it freezes on the top.
    Last edited by Neufy16; 07-26-2012 at 01:58 AM.

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Scroll then freeze

    Okay..

    Have you enabled contents (macros) ?
    Did you tried moving using your keyboard's down arrow from Row 1 to downwards ?

    For the scroll code, Press Alt + F11, Press Alt + I + M and paste that code there... now press Alt + F8 and choose the macro name from there and run.
    You also do editing on this code as per my comments

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  9. #9
    Registered User
    Join Date
    07-25-2012
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Scroll then freeze

    im either doing something wrong, or were not understanding what I need here.

    as the user scrolls down the worksheet with their mouse, I need row 10 to be the frozen row at the very top of the screen.

    Row 1 through 9 are filled with legends and instructions, so they are not necessary.
    My chart begins on row 10.

    As you scroll down past the legends and instructions I want them to scroll past the screen and allow the charts headings (located on row 10) to be frozen on the very top of the worksheet.

  10. #10
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Scroll then freeze

    Okay..

    Row 10 should be freezed and row 1 to 9 should be scrolled up and then row 11 onwards should be scrolled up.... sorry not possible
    Because you need row 10 to act as a floating row when you move down and up and I don't think it is achievable

    There are two methods, choose which fits your best :-
    Scroll lock:- it will lock any range / area like a1:z10 range but then it is locked and will be visible always and you would not be able to move up / down / right / left leaving this range
    Freeze panes:- If you apply freeze panes by selecting row 11, freeze pane will be applied on row 10 and then row 1 to row 10 would always be on top ... everytime

    choice is yours

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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