Save and Restore Excel Workbook Options using VBA

smiller

New Member
Joined
Aug 25, 2002
Messages
5
I have a spreadsheet that requires changing the Excel Workbook options. When the spreadsheet is opened the options for this Workbook replace the Excel options that the user has set. I am trying to find the proper VBA procedure to save the user's Option settings prior to the Workbook being opened so the user settings can be restored when my Workbook is closed. Suggestions appreciated.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Asuming the settings are the ones accessible from Tools Options, which ones do you want to save? There are a lot of them
 
Upvote 0
I want to save all of the setting on the Tools>Option area that the user has before my workbook is opened. When the user is finished with my workbook I want to restore the settings that the user had before using my workbook. Does this make sense?
 
Upvote 0
It makes perfect sense. As far as I know, you have to save each of the settings one at a time. Say in case of the View option you want to save the current Formula Bar and Status bar visiblity propertys:

formbar = Application.DisplayFormulaBar
statbar = Application.DisplayStatusBar

Then when you restored at the end,

With Application
.DisplayFormulaBar = formbar
.DisplayStatusBar = statbar
End With

You can find the name for each option by using the record macro feature
 
Upvote 0
Thank you very much for your prompt response. I was hoping that each individual setting would not have to be addressed.
 
Upvote 0

Forum statistics

Threads
1,222,415
Messages
6,165,896
Members
451,993
Latest member
rowebca

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