Preserving Scroll Area After Workbook Close

vba_monkey

Board Regular
Joined
Dec 18, 2013
Messages
112
Hello,

I have a macro which creates a new spreadsheet and saves as .xlsx. Among many other formatting tasks, one of the things the macro does is to set the scroll area to the used range on each tab.

This all works perfectly but the only problem is, once the workbook has been closed and reopened, the scroll area has been deleted.

How do I get excel to save the scroll area?
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
It would help if we could see the code. I suspect you might be setting the Scroll Area of the wrong workbook.
 
Upvote 0
I'm not setting it in the wrong workbook, as I said, everything works fine it just doesn't preserve the scroll area after workbook close.
 
Upvote 0
You can't - it doesn't persist. You have to reset it on file open.
 
Upvote 0
No, it isn't (without a separate macro enabled file controlling it, anyway)
 
Last edited:
Upvote 0
Your best option may be to hide the rows/columns that shouldn't be visible and then protect the sheet.
 
Upvote 0

Forum statistics

Threads
1,215,972
Messages
6,128,014
Members
449,414
Latest member
sameri

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