Worksheets("Use Vba Code").ScrollArea = "B4:E15" Then, Insert the following code in that blank module:.Next, select the option “View Code” from the available options.First, right-click on the sheet “Use VBA Code”.Now, just go through the steps given below to lock cells in excel when scrolling. As we have said before to illustrate this method we will continue with the same dataset that we used before. If you lock cells with VBA code then you will not lose the lock feature after closing the excel file. ![]() This code will lock specific cell ranges from our worksheet. To lock cells permanently in excel when scrolling we will use a simple VBA (Visual Basic for Applications)code in our worksheet. Apply VBA Code to Lock Cells in Excel When Scrolling How to Repeat Rows in Excel When Scrolling (6 Suitable Ways)Ģ.Vertical Scroll Not Working in Excel (9 Quick Solutions).How to Stop Excel from Scrolling to Infinity (7 Effective Methods).Excel Arrows Scrolling Not Moving Cells (6 Possible Solutions).How to Scroll One Row at a Time in Excel (4 Quick Ways).Read More: How to Unlock Cells in Excel When Scrolling (4 Easy Ways) So, to lock cells permanently we will use the second method of this article. If you close your worksheet or workbook and reopen it you will see that the lock cells feature doesn’t work anymore. This method works until you keep your workbook or worksheet active. Finally, the above action unlocks the cell range again.Then, delete the previous range from the input box of the ScrollArea and keep it blank.The command opens the dialogue box named Properties.In the beginning, select the Properties option from the Developer tab again.We will do this with the following steps. Now, if we want to unlock the cell range we can do it easily. Read More: Excel Not Scrolling with Arrow Keys (4 Suitable Solutions) Lastly, we can see that we also can not scroll after cell E15 which is the last value of our cell range.Similarly, select cell E4 and scroll downwards with the keyboard.So, the users will only be able to scroll to cell E5 as they do not have the access to scroll outside the range (B4:E15).Then, select cell B4 and scroll rightwards with the keyboard.The above command locks the cells within the range (B4:E15).Thirdly, insert the cell range (B4:E15) manually in the input box of the option ScrollArea.Next, go to the option ScrollArea from that box.The above actions open a new dialogue box named Properties.Secondly, select the option Properties from the ribbon.Now, let’s see the steps to how we can perform this action. This method will restrict users from modifying any kind of data outside the cell range (B4:E15). In the first method, we will use the Developer tab to lock cells. Use Developer Tab to Lock Cells When Scrolling in Excel So, the user will only be able to select and scroll within this cell range.ġ. Our target is to restrict a user only within the range (B4:E15) by locking the cells. The range of the dataset is (B4:E15) and it contains the data of Salesperson their Location, Region and “Total Amount” of sales. We have given a screenshot of our dataset in this section. To make you understand better we will use the same dataset for explaining both methods. ![]() In this article, we will explain 2 ways to lock screens in excel when scrolling. ![]() This requires the use of the namespace.2 Easy Ways to Lock Cells in Excel When Scrolling ![]() The Console class does not provide a method or property that returns the status of Scroll Lock so that you can change the operation of your program in response to it. In previous articles we have seen how to use the Console and Control classes to retrieve the status of the Caps Lock and Num Lock keys. This type of behaviour can be seen in Microsoft Excel. In such a situation, when Scroll Lock is enabled and the arrow keys are pressed, the active window simply scrolls. One common use is to fix the location of the caret, or flashing text cursor, or to fix the position of some other location indicator. Its purpose changes between programs, although for a large amount of software it has no effect on input. The Scroll Lock key is an infrequently used key on most computer keyboards. The principle purpose for Scroll Lock is to fix the position of the caret, or text cursor, and instead scroll the window when the arrow keys are pressed. The Scroll Lock key is a toggle key that behaves in a similar manner to Caps Lock and Num Lock.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |