How can you limit the data entry range in Excel?

J

Joe

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

Marcelo

Hi Joe,

did you try to protect the ws?

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



"Joe" escreveu:
 
G

George Nicholson

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
 
Top