window size/scroll

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
is there any code out there that does the following:
As I move (increase or decrease) excel window size with mouse, spreadsheet
moves with it.
Also is it possible to disable the scrolling in excel?

Thanks for the help
 
for scrolling, you can hide the scollbars on the window under Tools=>Options
(or with code).

You can set the scrollarea property of the worksheet.

If you maximize the spreadsheet, then it won't be a problem.
 
Hi
Not sure i understand the first question.
To prevent scrolling, one way would be to set the ScrollArea property of the
Worksheet object to a specific range so that the user cannot scroll that
range, say A1:O35. However, in xl2k, this setting is not saved with the book
so you have to set it in the Workbook_Open sub. Not sure whether or not this
setting is saved with the book in xp or 2003.
 
Hi Tom,
I would like to do it with code.
I will do that while recording macro so I can see the code, then use it.

Do you have any input about the other question (size of the window adjustment)
I appreciate your help
 
Hi Sebastienm
do you know the code/commands to set the range for scroll bar?

Thanks for your help
 
From Excel's online help:
"
ScrollArea Property
Returns or sets the range where scrolling is allowed, as an A1-style range
reference. Cells outside the scroll area cannot be selected. Read/write
String.
Remarks
Set this property to the empty string ("") to enable cell selection for the
entire sheet.
"

eg given there: Worksheets(1).ScrollArea = "a1:f10"
 

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