ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How can you limit the data entry range in Excel? (https://www.excelbanter.com/excel-worksheet-functions/170767-how-can-you-limit-data-entry-range-excel.html)

Joe

How can you limit the data entry range in Excel?
 
Is it possible to 'freeze' the cursor position on a spreadsheet so data can
be entered in one cell only?

Marcelo

How can you limit the data entry range in Excel?
 
Hi Joe,

did you try to protect the ws?

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Joe" escreveu:

Is it possible to 'freeze' the cursor position on a spreadsheet so data can
be entered in one cell only?


George Nicholson

How can you limit the data entry range in Excel?
 
In addtion to using the Locked property of Cells and then protecting the
worksheet, you can use the ScrollArea property in VBA to limit what cells
can be selected as well as how much the user is allowed to see.

Worksheets(1).ScrollArea = "a1"

The above would 1) only allow A1 to be selected and 2) the user would not be
able to scroll to any other area of the worksheet.
If i recall correctly, ScrollArea does *not* persist between sessions
(unlike Locked & protection), so you need to place it in Workbook.Open or
something similar.

You also might want to be sure that the specified range is showing before
invoking ScrollArea.

Application.Goto Reference:=Worksheets(1).Range("A1"), scroll:=True

--
HTH,
George


"Joe" wrote in message
...
Is it possible to 'freeze' the cursor position on a spreadsheet so data
can
be entered in one cell only?





All times are GMT +1. The time now is 10:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com