Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default Restrictions on worksheet display

Is it possible to lock a
worksheet so that

a) the user cannot move the cursor outside of a certain row range and a
certain column range ?

b) the use cannot change the location on the screen of the window displaying
the worksheet, and he cannot change the size of the window displaying the
worksheet?

Thanks
--
-regards
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Restrictions on worksheet display

You can protect the workbook windows and structure under
ToolsProtectionProtect Workbook to disallow resizing or moving.

You can set the ScrollArea so users cannot move out of that area.

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

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

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

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

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


Gord Dibben MS Excel MVP



On Tue, 24 Jul 2007 12:14:01 -0700, GeorgeJ
wrote:

Is it possible to lock a
worksheet so that

a) the user cannot move the cursor outside of a certain row range and a
certain column range ?

b) the use cannot change the location on the screen of the window displaying
the worksheet, and he cannot change the size of the window displaying the
worksheet?

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default Restrictions on worksheet display

Thanks Gord. The stuff about scroll area was very helpful. Now suppose I
want to change back so the user can access all the cells of the sheet. What
would the code be for that ?
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Restrictions on worksheet display

Assign this to a button or shortcut key.

Sub Scroll_All()
Sheets("YourSheet").ScrollArea = ""
End Sub

Note: scrollarea will be re-set when you next open the workbook.


Gord

On Tue, 24 Jul 2007 15:14:06 -0700, GeorgeJ
wrote:

Thanks Gord. The stuff about scroll area was very helpful. Now suppose I
want to change back so the user can access all the cells of the sheet. What
would the code be for that ?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text Restrictions LPS Excel Worksheet Functions 3 September 25th 06 08:23 PM
data restrictions contractormike Excel Discussion (Misc queries) 3 August 12th 06 01:48 AM
How to add Restrictions to Combo Box?/ Balazee Excel Worksheet Functions 1 June 20th 06 03:11 AM
Field and Worksheet Restrictions alvarezrrb Excel Discussion (Misc queries) 2 June 4th 06 12:36 PM
How to do look up with restrictions JackR Excel Discussion (Misc queries) 3 April 3rd 06 01:12 AM


All times are GMT +1. The time now is 01:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"