Locking the view of Excel sheet

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
 
H

Harald Staff

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
 
S

sameerce

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

Samee
 
A

Abhinav

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
 
F

Frank Kabel

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
 
A

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
 
A

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
 
J

John Netherlands

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
 
Top