Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

simple question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shlomop - 18 Jul 2006 17:39 GMT
how can i make that you should not be able to scroll down a sheet
Dave Peterson - 18 Jul 2006 17:46 GMT
You can make it so that users can't scroll off the area that you set.  But it
requires a small macro:

Option Explicit
Sub auto_open()
   With Worksheets("sheet1")
       .ScrollArea = "a1:g55"
   End With
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

> how can i make that you should not be able to scroll down a sheet?
>
[quoted text clipped - 3 lines]
> shlomop's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=9734
> View this thread: http://www.excelforum.com/showthread.php?threadid=562536

Signature

Dave Peterson

patele - 19 Jul 2006 12:11 GMT
Another way:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Me.ScrollArea = "A1:J20"
End Sub

E
Dave Peterson - 19 Jul 2006 12:25 GMT
I'm not sure I'd use the _selectionchange event.  To toggle that setting to the
same range address each time you change selection seems a little overkill to me.

> Another way:
>
[quoted text clipped - 9 lines]
> patele's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=35849
> View this thread: http://www.excelforum.com/showthread.php?threadid=562536

Signature

Dave Peterson

patele - 19 Jul 2006 15:36 GMT
Maybe I'm missing something, where's the overkill?

Signature

patele

Dave Peterson - 19 Jul 2006 16:20 GMT
Each time the user changes the selection, this code will run:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Me.ScrollArea = "A1:J20"
End Sub

After it's been set the first time, it's not changing anything.  

But the code still runs each and everytime the user changes the selection.

> Maybe I'm missing something, where's the overkill?
>
[quoted text clipped - 3 lines]
> patele's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=35849
> View this thread: http://www.excelforum.com/showthread.php?threadid=562536

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.