stop scrolling
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Stop Scrolling

Stop Scrolling

resolvedResolved · Low Priority · Version 2007

replyReply Mon 30 Jan 2012, 12:22Delegate Elvin said...

Elvin has attended:
Excel VBA Intro Intermediate course

Stop Scrolling

Hi

I need to prevent users from scrolling in each worksheet of the workbook. I have tried teh followign but it does not work. Are you able to hep ?

Private Sub Worksheet_Activate()
Worksheets(1).ScrollArea = "a1:m34"
End Sub


Thanks



Elvin

For upcoming training course dates see: Pricing & availability

replyReply Mon 30 Jan 2012, 14:21Trainer Doug said...

RE: Stop Scrolling

Hi Elvin

Your example does work but you have to activate Sheet1 first. Try clicking into Sheet2 then back into Sheet1.

Another place to add the code to is ThisWorkbook
(Double click ThisWorkbook, change from General to Workbook, Open)

Private Sub Workbook_Open()
Worksheets(1).ScrollArea = "a1:m34"
End Sub

Remember to save as a macro enabled workbook when finished or a 97-2003 format.

hope that helps

Cheers
Doug
Best STL

Mon 6 Feb 2012: Automatically marked as resolved.

 

Please browse our web site to find out more about
microsoft excel courses in london and other Microsoft training courses.

Excel tip:

Hide separate columns in Excel 2010

If you want to hide columns not adjacent to each other for example, Columns A, C and E then:-

1) Click on the fist column to be hidden i.e. A

2) Press and hold down the CTRL key

3) While holding the CTRL key, left click on the rest of the columns you want to hide i.e. C and E

4) Right click and choose Hide

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard