Workbook sizing

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

Guest

Is there a way to change the size of the Excel workbook window such that a
user will not be able to scroll up or down for a given worksheet within the
workbook.

The only scrolling information I find in J. Walkenbach's book is relative to
userforms.

Thank you in advance for your assistance.

Kind regards,

Darryl
 
I have a check box on a work sheet. When I open this work book I want to
uncheck it if it is checked. I have tred to put code in when the work book
opens and when the sheet is activated, to no avail. I have recroded macros
and inserted them but get an error message when the workbook loads. Is there
any way to clear the check box when the workbook loads.
 
One way to do it would be to turn protection on for all of the cells sheet.
Then un-protect those cells that the user can change or enter information
into. Then protect the sheet allowing the user to only select the
un-protected cells.
 
You could hide rows/columns so that the user can't even see them.

Or you could set the ScrollArea to be what you want--each time you open the
workbook:

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi"
' .EnableSelection = xlUnlockedCells
.ScrollArea = .Range("a1:f22").Address
End With
End Sub

Excel won't remember these settings after you close it and reopen the workbook
(that's why it's in auto_open).

If you want to keep the users from selecting locked cells, too, then uncomment
that line in the middle.
 
Excellent, thanks for the assistance again !!!!

Dave Peterson said:
You could hide rows/columns so that the user can't even see them.

Or you could set the ScrollArea to be what you want--each time you open the
workbook:

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi"
' .EnableSelection = xlUnlockedCells
.ScrollArea = .Range("a1:f22").Address
End With
End Sub

Excel won't remember these settings after you close it and reopen the workbook
(that's why it's in auto_open).

If you want to keep the users from selecting locked cells, too, then uncomment
that line in the middle.
 
D.Parker said:
Is there a way to change the size of the Excel workbook window such that a
user will not be able to scroll up or down for a given worksheet within the
workbook.

The only scrolling information I find in J. Walkenbach's book is relative to
userforms.

Thank you in advance for your assistance.

Kind regards,

Darryl
 
Is there a question here?

See VBA help on ScrollArea

Note: scrollarea won't stick between sessions so must be reset each time
the workbook is opened.


Gord Dibben MS Excel MVP
 
Back
Top