How can you limit the data entry range in Excel?

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

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

did you try to protect the ws?

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



"Joe" escreveu:
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top