Restrict the active/selectable area manually
Open VBA:
Alt + F11 → Ctrl + G to open the Immediate Window.
Then type, for example:
ActiveSheet.ScrollArea = "A1:H40"
Press Enter.
Now only cells A1:H40 can be selected/clicked.
Remove the restriction again
ActiveSheet.ScrollArea = ""
Important detail
ScrollArea is not permanently saved reliably when you close and reopen the workbook. So if you want the restriction to be applied every time the workbook opens, put it in the worksheet or workbook VBA code.
For example, in ThisWorkbook:
Private Sub Workbook_Open()
Worksheets("Sheet1").ScrollArea = "A1:H40"
End Sub
Replace "Sheet1" with your actual worksheet name.
For your PMEG Excel file, you could restrict the user input sheet to only the cells that are meant to be filled, for example:
Private Sub Workbook_Open()
Worksheets("Input").ScrollArea = "A1:K60"
End Sub
So the principle is:
Worksheets("YourSheetName").ScrollArea = "YourAllowedRange"
Post Views: 52
