limit scroll area macro not activating

Malissa1578

New Member
Joined
Mar 14, 2013
Messages
10
I am going to bang my head against my keyboard soon... :mad:

This is what I have and I have tried everything I can think of to make it work.

Activate module, dim, blah blah blah... I have read everything possible I can find and nothing is making it work.

Private Sub Workbook_Open()
Sheets("Sprinkler Projects").ScrollArea = "A1:AJ184"
End Sub

It is a project tracker workbook, it is going to have multiple tabs (I have two right now Sprinkler Projects and Sheet1) when finished and I want to set a scroll area for each one when finished. Workbook name is Sprinkler Ti Projects if that has any bearing on it.

The above tab is finished and the scroll area limits are not working.
I can go in and set them for the one edit session and when trying to make it permanent it is just not doing anything. It is saved as a macro enabled workbook. :banghead:

It is probably something simple, but seriously... I need help.
 
Hi,

Your code worked fine for me in Excel 2010 on Win 7, placed in the Workbook Module in the VBE.

igold
 
Upvote 0
It just simply will not work for me. I have continued on with the workbook. Maybe eventually there will be some sort of solution or resolution.
 
Upvote 0
Try adding a Message Box to your code:
Code:
[COLOR=#333333]Private Sub Workbook_Open()
[/COLOR]    MsgBox "Running Scroll Area Code"
[COLOR=#333333]    Sheets("Sprinkler Projects").ScrollArea = "A1:AJ184"[/COLOR]
[COLOR=#333333]End Sub[/COLOR]
Then save your workbook, and then try closing and re-opening it.
When you open it, do you see the Message box?
What sheet does the file open on?

If you do not get the message, it probably means one of two things:
1. You did not place this code in the "ThisWorkbook" VBA module (it HAS to be in that one, it will not work if in any other module, like a Sheet or Standard module).
2. Your Macros/VBA are disabled.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top