stop scrolling

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

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

Stop Scrolling

resolvedResolved · Low Priority · Version 2007

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

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.

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Change the Print button so it brings up the Print dialogue box

If you want to bring up the Print dialogue box to check your print settings when you hit the Print button, do the following:

1. Right-click on the toolbar that displays the Print button.

2. Select Customise.

3. Click on the Print button on the toolbar to select it, then hold the left mouse button down and drag the button towards the screen below. The button should come off the toolbar.

4. In the Customise dialogue box on your screen, select the Commands tab.

5. Select File from the Categories list, and then locate the Print... icon (looks like the normal Print button, but the word Print has three dots following it).

6. Click on the Print... icon to select it, then use your left mouse to drag and drop the icon onto the toolbar at the top of the screen.

7. Close the Customise dialogue box.

View all Excel hints and tips


Server loaded in 0.07 secs.