Auto-Saving .XLA Code Changes?

P

PeteCresswell

I keep burning myself by not clicking File | Save after making changes
to VBA code in a .XLA.

Looked through the options, but couldn't find anything that would auto-
save any code changes - or at least prompt me.

Doesn't seem right - so I'm probably missing something.

Can anybody elucidate?
 
P

Peter T

One idea perhaps, while developping -

Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Not ThisWorkbook.Saved Then
If MsgBox("Do you want to save" & vbCr & _
ThisWorkbook.FullName, vbYesNo) = vbYes Then
Me.Save
End If
End If
End Sub

Regards,
Peter T
 

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

Top