vb code for saving a workbook when shutting an excel file down

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I can't remember the code for a sheet to auto save when shutting it down....

It went something like

sub Auto_saveme()

Any suggestions?
 
hi,
put this in a thisworkbook module
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWorkbook.Save
End Sub

regards
FSt1
 
Hello,

Thank you...

When i put this in it asks me whether or not i want to save... is there any
code that i can put in that'll do it automatically without it asking?
 

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