Freezing columnes and rows

  • Thread starter Thread starter Brenda
  • Start date Start date
B

Brenda

I have created a program in excel however i don't want people to be able to
scroll to the right after column F and i don't want them to be able to scroll
after row 27 how can i do this so that they can only view what is inside
those two areas? Do i have to create a macro? If i do what would the Macro
code be? Help is greatly appreciated.
 
That isn't what i am looking for i did get that to work but you can still
scroll down and i don't want them to be able to scroll down at all. How do i
fix that please refer to my orginal message. thanks
 
You could go one step further.
First, click in cell G28, then go to menu Window|Freeze Panes
Second, as before, hide columns G through IV
Third, hide rows 28 through 65536 (both assumptions is that you have xl2003.
Now, your block of data stays there no matter how much 'scrolling is
attempted. For aesthetics, you could go to menu Tools|Options, and uncheck
the checkbox for Row & column heaers on the View tab, and then it won't even
'bump out a little' when they scroll down.
 
You could go one step further.
First, click in cell G28, then go to menu Window|Freeze Panes
Second, as before, hide columns G through IV
Third, hide rows 28 through 65536 (both assumptions is that you have xl2003.
Now, your block of data stays there no matter how much 'scrolling is
attempted. For aesthetics, you could go to menu Tools|Options, and uncheck
the checkbox for Row & column heaers on the View tab, and then it won't even
'bump out a little' when they scroll down.

--
John C






- Show quoted text -

And to go a bit further you can unlock the visible cell if they need
to be modified, then protect the sheet by allowing the user to select
unlocked cells. After this even if someone wants to unhide the hidden
content it wouldn't be possible.

Note: this is an extra step to do if you follow John C advise.

Frank G
 
You could set the scrolling area through VBA

Since the scrollarea method does not stick between sessions you will have to
reset it each time you open the workbook.

You may wish to place the code into a WorkBook_Open Sub in ThisWorkbook
module and specify which worksheet if only one sheet required.

Adjust the sheetname and range to suit.

Private Sub WorkBook_Open()
Sheets("YourSheet").ScrollArea = "A1:F27"
End Sub

Or this in the Thisworkbook module to limit scrollarea on all sheets.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
With ActiveSheet
.ScrollArea = "A1:F27"
End With
End Sub


Gord Dibben MS Excel MVP
 
when i apply this code and i scroll to the right why can't i scroll back to
the left when there is text.
 
Sorry Brenda but I don't understand what you're asking.

Setting the scrollarea allows you scroll within that set area only.

i.e. A1:F27 in the example posted


Gord
 

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

Similar Threads


Back
Top