Workbook sizing

D

D.Parker

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
 
J

JB in Kansas

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.
 
J

JB in Kansas

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.
 
D

Dave Peterson

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

D.Parker

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.
 
J

John in CA

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
 
G

Gord Dibben

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
 

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

Top