How to Stop Excel from Scrolling to Infinity (7 Effective Methods)

Get FREE Advanced Excel Exercises with Solutions!

The article will show you some basic methods on how to stop Excel from scrolling to infinity. Disabling the scrolling may help us to get a better view of our Excel chart or hide some confidential data from other users. So it’s important in business or official activities.

In the dataset, we have some primary information about some people; their IDs, Names and Email addresses. I’ll be showing the processes of locking the cells without data so that the Excel sheet will not be suitable for scrolling.

how to stop excel from scrolling to infinity


Download Practice Workbook


7 Ways to Stop Excel From Scrolling to Infinity

1. Using Developer Property to Stop Excel from Scrolling to Infinity

In this section, I’ll show you how to stop scrolling to infinity using the Developer Property for an Excel sheet. However, this is a temporary process. If you close your workbook and open it again, it won’t work. Let’s go through the steps below for a better understanding.

Steps:

  • First, go to Developer >> then select Property

  • After that, type the range that you want to be enabled for scrolling in the Properties In my case, the range is $A$1:$E$14.

how to stop excel from scrolling to infinity

  • Finally, close the Properties Your Excel sheet is now not suitable for scrolling outside this range.

Thus you can stop Excel from Scrolling to Infinity.

Read More: Smooth Scrolling with Mouse Wheel in Excel (A Detailed Analysis)


2. Use of VBA to Stop an Excel Sheet from Scrolling to Infinity 

You can also stop an Excel sheet from scrolling to infinity by using a VBA code. Applying this method will also help you format any cells you want. Let’s go through the steps below for a better understanding.

Steps:

  • First, go to Developer >> then select Visual Basic

how to stop excel from scrolling to infinity

  • After that, select Insert >> then select Module

  • Then a VBA Module will open. Type the following code in that module.
Sub StopScrollingAndFormat()
Sheets("vba").Select
ActiveSheet.ScrollArea = ""
    Range("C7").Select
    Selection.Font.Bold = True
ActiveSheet.ScrollArea = "$A$1:$E$15"
End Sub

how to stop excel from scrolling to infinity

Code Explanation

  • First, we named our Sub Procedure as StopScrollingAndFormat.
  • Then we select the sheet named vba.
  • After that, we set the Scroll Area of that sheet to Infinity.
  • Later, cell C7 is selected via VBA Range Method and also the font is formatted to Bold for C7.
  • Finally, we set the range $A$1:E$15$ as the Scroll Area of the Active Sheet.

  • Now go back to your sheet and Run the Macro.

  • You will see that the name in cell C7 becomes Bold. Also, you will not be able to scroll down your Excel sheet.

how to stop excel from scrolling to infinity

Thus you can stop Excel from Scrolling to Infinity. However, the operation resets after closing your workbook meaning when you open your Excel file, it won’t work.

Read More: How to Stop Excel from Jumping Cells When Scrolling (8 Easy Methods)


3. VBA to Stop Scrolling from Infinity for Range of Cells

If you want to have a permanent solution to stop scrolling, you can apply the process of this section. The operation of this procedure will hold the scroll lock even if you close and open your Excel workbook.

Steps:

  • Follow Section 2 to open the VBA Editor.
  • After that, open the workbook sheet from the VBAProject window and type the following code in it.
Private Sub Worksheet_Activate()
Me.ScrollArea = "A1:E15"
End Sub

Here, we activate worksheet for Private Sub Procedure and set the desired scrolling area. In this case, I set the range A1:E15 for scrolling. This means it’s impossible to select any cell outside this range and scroll down.

  • Finally, press CTRL+S to save the file and go back to your sheet. In this case, the name of the sheet is a workbook. You won’t be able to select any of the cells outside the range and scroll down even though you close the Excel file and open it again.

how to stop excel from scrolling to infinity

Thus you can stop Scrolling to Infinity the Me keyword of VBA.

Read More: How to Scroll One Row at a Time in Excel (4 Quick Ways)


4. Excel VBA to Stop Scrolling to Infinity for Used Range 

You can also define a used range to lock and thus stop scrolling to iscroll bar by deleting an invisible cnfinity. Let’s go through the procedure below.

Steps:

  • Follow Section 2 to open the VBA Editor.
  • After that, I opened the ‘used range’ sheet from the VBAProject window and typed the following code in it.
Private Sub Worksheet_Activate()
    Me.ScrollArea = Range(Me.UsedRange, Me.UsedRange(13, 4)).Address
End Sub

Here, we activate worksheet for Private Sub Procedure and set the desired scrolling area by the UsedRange property of VBA. In this case, I set the UsedRange Address to (13, 4) which means 13 rows and 4 columns from where the data starts will be available to scroll or edit.

  • Finally, press CTRL+S to save the file and go back to your sheet. In this case, the name of the sheet is workbook. You won’t be able to select any of the cells outside the range that we set by UsedRang and scroll.

how to stop excel from scrolling to infinity

Thus you can stop Scrolling to Infinity by using the Me keyword and UsedRange property of VBA.

Read More: How to Lock Rows in Excel When Scrolling (4 Easy Methods)


Similar Readings


5. Hiding Rows or Columns to Stop Excel from Scrolling to Infinity

If you don’t want to trouble yourself with VBA coding, you can use the Hide Rows or Columns command to stop scrolling to infinity. Let’s go through the instructions below.

Steps:

  • Select the empty row after your dataset. In my case, it’s the 13th. You can choose other rows if you want.

  • After that, press CTRL+SHIFT+Down Arrow key. It will select all the remaining empty rows in that sheet.
  • Right-click on anywhere of the selected cells and select Hide.

how to stop excel from scrolling to infinity

  • All the empty rows will not be visible anymore. Now select the column after which you want to lock scrolling. In my case, it’s the F column.

  • After that, press CTRL+SHIFT+Left Arrow It will select all the empty columns after the F column.
  • Right-click on any of the selected cells and select Hide.

how to stop excel from scrolling to infinity

  • After that, all the empty columns are also not visible. And you can not scroll down to infinity.

Thus you can stop Scrolling to Infinity.

Read More: Excel Not Scrolling with Arrow Keys (4 Suitable Solutions)


6. Stop Scrolling to Infinity by Turning Off Horizontal and Vertical Scroll Bars

Another way to stop Scrolling to Infinity is to turn off the Horizontal and Vertical Scroll Bars from options. Let’s go through the following description.

Steps:

  • First, go to File tab.

how to stop excel from scrolling to infinity

  • Then select Options.

  • In the Options window, go to Advanced >> Display options for this workbook:
  • Uncheck both ‘Show horizontal scroll bar’ and ‘Show vertical scroll bar’.
  • After that, click OK.

how to stop excel from scrolling to infinity

  • Finally, the Horizontal and Vertical Scroll Bars become hidden.

Thus, you can hide the scroll bar. You won’t be able to scroll with your mouse to the right but you can still scroll down. So this actually stops horizontal scrolling to infinity. 

Read More: [Solved!] Vertical Scroll Not Working in Excel (9 Quick Solutions)


7. Delete Invisible Cells to Stop Scrolling to Infinity

If you have data in the lower cells which cannot see, you can delete it to reset the scroll bar to its original position. Let’s see the process below.

Steps:

Suppose you have data in C1048562.

how to stop excel from scrolling to infinity

  • First, select the 13th row and press the CTRL+SHIFT+Down Arrow key.

This operation will select all the rows down to the 12th row.

how to stop excel from scrolling to infinity

  • Now press CTRL+- (minus). This will delete all the empty cells along with the data in C1048562. Hence, it resets the position of vertical scroll bars. But it still remains in infinity view.

  • Finally, press CTRL+S to save the file. You will also see that the scroll bar now fit to the sheet meaning it is not in infinity mode.

how to stop excel from scrolling to infinity

Thus you can reset the scroll bar by deleting an invisible cell.

Read More: How to Stop Arrow Keys from Scrolling in Excel (3 Easy Methods)


Practice Section

Here, I’m giving you the dataset of this article so that you can make a workbook on your own and practice these methods.

how to stop excel from scrolling to infinity


Conclusion

In the end, we can conclude with the statement that you will learn the basic methods on how to stop excel from Scrolling to Infinity. If you have any better methods or feedback regarding this article, please share them in the comment box. Your valuable thoughts will help me enrich my upcoming articles.


Related Articles

Meraz Al Nahian

Meraz Al Nahian

Hello, Nahian here! I do enjoy my efforts to help you understand some little basics on Microsoft Excel I've completed my graduation in Electrical & Electronic Engineering from BUET and I want to be a successful engineer in my life through intellect and hard-work, and that is the goal of my career.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo