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.
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.
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
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
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>
yes, exactly what I need. thanks for the quick response
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.
For Scroll lock, you can use below code in any standard module. See the instructions given in the code itself and play around![]()
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If ActiveCell.Row = 11 Then Rows("11:11").Select ActiveWindow.FreezePanes = True End If End Sub
![]()
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>
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.
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>
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.
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>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks