Question:
Help with EXCEL VB Code. How do I make excel "lock after row 68 and column N" Meaning I don't want the user
GoogleMeBiotCH
2008-07-15 07:39:52 UTC
to be able to scroll past row 68 or row N?
Three answers:
AQuestionMark
2008-07-16 02:54:15 UTC
Put the following into thisWorkbook module in the vba editor, when workbook open, sheet 1 will be sure restricted to the max. row and column



Private Sub Workbook_Open()

   maxrow = 68 'change this for maximum row allowed

   maxcol = "N" 'change this for maximum column allowed

   Worksheets("Sheet1" ).Range( "$" & maxrow + 1 & ":$65536").EntireRow.Hidden = True

   Worksheets("Sheet1" ).Range( Cells(1, Range( maxcol & "1" ).Column + 1), Cells( 1, 256)).EntireColumn.Hidden = True

End Sub



If you have more than 1 sheet to put the restriction, use a loop to wrap the last 2 lines, if you don't want user to change the restriction, use code protect worksheet and put password on protection of both code and sheet protection.

Please contact for more info
?
2016-10-31 10:56:23 UTC
To freeze columns and rows in Excel, a million. From the View menu, make specific you're applying customary. 2. click the row quantity basically under the section you would be wanting to freeze. the full row could spotlight. 3. click the cellular on that highlighted row to the wonderful of the columns you will opt to freeze. 4. From the Window menu, go with Freeze Panes. As occasion, if I click cellular C2 on the spreadsheet under, i'm freezing the 1st and final columns as nicely because of the fact the wonderful row with the column headings. i've got defined this section in crimson.
Mana D
2008-07-15 08:11:54 UTC
Oracle tutorials-

http://oracletutorials.info/


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...