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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
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,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

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