View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier[_3_] Roger Govier[_3_] is offline
external usenet poster
 
Posts: 2,480
Default limit worksheet size

Hi

You can do it by setting the scroll area of a page.
To try this, right click on a tab and choose View Code
If the Properties window is not visible, press F4 to activate it.
3 rows from the bottom, you will see a ScrollArea property.
Type in there A1:K50, then press Alt+F11 to return to Excel

You will now find that you can only move your cursor within that range that
you set.

If that is what you want, then you will need to add some code to the
Workbook Open event of your Workbook, to set the values, as they are only
transient, and are "forgotten" as soon as Excel closes.

Press Alt+F11 to return to the VBE, and double click on the ThisWorkbook
module in the left pane of explorer.
Copy the code below and Paste into the white pane on the right of the
screen.
Private Sub Workbook_Open()

ThisWorkbook.Worksheets("Sheet1").ScrollArea = "A1:K50"

End Sub

Change the sheet name and the scroll area to suit.

Be aware that this method will prevent the user from doing other things,
e.g. Insert or Delete Rows or Columns.
You can remove the scroll area at any time by using the manual method
described at the beginning of this post, and just deleting the values in the
Scroll Area field.

In code, just set ScrollArea =""


--

Regards
Roger Govier

"AdrianaMex" wrote in message
...
Hi JP and Mike, First, thank you for your answears, but this is not what I
am
looking for. I've seen others' sheets work like this, but I don't know how
people do it. Could it be that they create a form?
Some times I've received letters that in stead of being in word are
written
in excel.
And you don't see the extra columns and rows....
Regards,

"Mike Rogers" wrote:

AdrianaMex

You might try going to toolsOptionsView tab and remove the check marks
from "Horizontal scrool bar" and Vertical scroll bar". This way they
have
less to work with. They can still scrool with the arrow keys but may be
less
likely to do so.

Mike Rogers

"AdrianaMex" wrote:

I have created a doc in excel, but I don't want users (or myself) to
scroll
down through the hundereds of empty cells below my two pages. Or scroll
right
across the hundreds of empty cells.

How can I restrict the size of a work sheet to prevent this scrolling?

Even trying to hide columns and rows seems too hard.
Basically, my first sheet is a one-pager.
The second- and following sheets will have one column but may grow
several
rows.
Thanks in advance!
Adriana