save and close

  • Thread starter Thread starter Jean-Paul De Winter
  • Start date Start date
J

Jean-Paul De Winter

Hi,
I would like to disable the rightmost puschbuttons so the user can not
minimise or close excel via these pushbuton.
What I would like is a pushbutton that, when pushed automatically
saves and overwrites the file and then closes excel in a way no
question is asked to the user.
Also, can I write some code so my excel files always opens maximized?
Thanks
JP
 
Hi Jean

If you protect the Workbook with Windows checked
Tools>Protection>Protect Workbook
The buttons are gone for the workbook

You can use a macro like this

Sub test()
ThisWorkbook.Close True
End Sub

Also, can I write some code so my excel files always opens maximized?

Check out this in the VBA help
WindowState Property
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top