Locking the view of Excel sheet

  • Thread starter Thread starter sameerce
  • Start date Start date
S

sameerce

Hi,

I wanted to lock the view of Excel sheet so that only certain number of
rows and columns are displayed to the user. Since I have an Excel sheet
where in only 50 rows are to be displayed and data has to be entered in
these cells. There is no need for showing the rest of the cells. The
user should not be able to scroll horizontally or vertically beyond
this number of cells.

Can this be acheived by some means.


Thanks,
Sameer
 
Hi Sameer

Assuming you want a programming solution:

Sub Makro1()
Rows("55:65536").Hidden = True
Columns("P:IV").Hidden = True
End Sub

HTH. Best wishes Harald
 
Hi Frank,
Thanks for the help. But can you tell me how can I then unhide th
rows/columns again.

Samee
 
Hi,

Is there any way to hide the scroll bars also .. ?

Thanks
Abhinav

Harald said:
Hi Sameer

Assuming you want a programming solution:

Sub Makro1()
Rows("55:65536").Hidden = True
Columns("P:IV").Hidden = True
End Sub

HTH. Best wishes Harald
 
Hi
manualyy: Goto 'Tools - Options - View' and uncheck both
scrollbars.
If you need a macro record the above action and use the
recorded code
-----Original Message-----
Hi,

Is there any way to hide the scroll bars also .. ?

Thanks
Abhinav
 
Frank said:
Hi
manualyy: Goto 'Tools - Options - View' and uncheck both
scrollbars.
If you need a macro record the above action and use the
recorded code
Hi .. The following is the recording ..
Sub Macro1()
'
With ActiveWindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With
End Sub

This hides the scroll bars for all the sheets ..i want to hide it on the
1st sheet, but show it on all others...

any way to do this ... ?

Thanks
Abhinav
 
Frank said:
Hi
AFAIK this setting can't be set individually for worksheets

I think we can do this using this:
Workbook_SheetActivate

In this Sub, we can check which sheet is being activated, and based on
this, show/hide the bars .

Just trying it out ..Thanks anyways :)

Regards
Abhinav
 
For example

Sub Scroll_Lock()
Worksheets("Name sheet").ScrollArea = "A1:J29"
End sub

With Tools-Option-scollbars You can enable them again en hidden rows can be
unhide
 

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