Format workspace on file opening and restore it on closing

phil_r

New Member
Joined
Oct 16, 2002
Messages
19
Hi,
I'd like to create a macro that formats the workspace to make it as clean as possible when the file is opened. Then, I'd like to restore the initial workspace when the user closes the file.
How can I create a macro that lounches on file opening?
And another one that lounches when the file is closed?
Or is there another way to obtain that?
Thanks in advance for your help;
Regards
Phil
This message was edited by phil_r on 2002-11-15 07:13
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Phil

Naming your Macro AUTO_OPEN will mean it runs when you start the file

Naming another Macro AUTO_CLOSE means it will run when the file is closed.
 
Upvote 0
Sorry Phil forgot the other bit

Name your views - say mine is LUKE

Sub AUTO_OPEN

ActiveWorkbook.CustomViews("LUKE").Show

End Sub


Sub AUTO_CLOSE

ActiveWindow.Zoom = 100

End Sub

Luke
 
Upvote 0
THANKS!!!
That's exactly what I wanted to know.
You've made a happy man.
Ciao and good week end
Phil
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,725
Members
448,987
Latest member
marion_davis

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