VBA ScrollArea = "Range"

Re: VBA scroll area for odd sheets

2013 Windows 10. I noticed it skips some sheets if I do not use activate. I tested on about 6 sheets.
@MAIT
Whilst I agree that the scrollarea is lost when you close the workbook, for me it works on on inactive sheets.
I'm running the 32bit version of 2013 on win7, what are you running?
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Re: VBA scroll area for odd sheets

I appreciate that y'all by combining my posts. I really didn't know how to. I though by asking an opposite question that it should be a separate thread. Thank you y'all for your patients.
 
Upvote 0
Re: VBA scroll area for odd sheets

I though by asking an opposite question that it should be a separate thread.
If it was a different question that would probably have been fine. However, the new question appears to be identical to part of the original question.

Is there a way to VBA ScrollArea all of ... AND ScrollArea all of the ODD sheet numbers to ??
.. set a scroll area for all of my odd sheet numbers in my workbook.
 
Upvote 0
Re: VBA scroll area for odd sheets

Hi Peter,

Thank you for clearing that up.

I'll be sure to link in the future.

Sorry about that!

Pinaceous
 
Upvote 0
Re: VBA scroll area for odd sheets

Okay Everyone,

How would I apply this code:

Code:
Sub SetAllScrollAreas()
Dim i As Long
 

For i = 1 To Sheets.Count Step 2
    Sheets(i).ScrollArea = "A1:BK80"
Next i
 

For i = 2 To Sheets.Count Step 2
    Sheets(i).ScrollArea = "A1:L80"
Next i
 

End Sub

To perform this code but OMIT it from happening on Sheet3??

Where Sheet3 will not have a scroll area lock applied to it??



Thanks,
Pinaceous
 
Upvote 0
Re: VBA scroll area for odd sheets

To perform this code but OMIT it from happening on Sheet3?
Assuming that means Sheet(3)
Rich (BB code):
For i = 1 To Sheets.Count Step 2
  If i <> 3 Then Sheets(i).ScrollArea = "A1:BK80"
Next i
 
Last edited:
Upvote 0
Re: VBA scroll area for odd sheets

Thanks Peter ! Your a gem ! :)

PS your right to state that I meant sheet3 is actually sheet(3)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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