Save on sheet shift

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

Guest

Hi there

I am new to this VBA, but i will try to give it a go.

I would like the workbook to be saved when the user shifts away from Sheet1
to be certain that content of Sheet1 is always saved.

I suppose that the piece of code should be placed in a VBA module under the
workbook

Thanks Ole
 
Try this:

Private Sub Worksheet_Deactivate()
ActiveWorkbook.Save
End Sub

Right click sheet1 sheet tab, view code and paste this in

Mike
 

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