I'm assuming you want it to save without asking, try:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Save = True
End Sub
Any good??
Ian Mac
Sorry that's the biggest load of rubbish I've just given you...(NT)
I'm assuming you want it to save without asking, try:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Save = True
End Sub
Any good??
Ian Mac
I'm assuming you want it to save without asking, try:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Save
End Sub
Any good??
Ian Mac
Thanks for responding. In fact I wanted it to close without saving, but I guess changing True into False would fix that, however I'm getting a compile error saying "Expected Function or variable", with the "Save =" highlighted. Do you have any thoughts on that?
Try
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Close SaveChanges:=False
End Sub
Juan Pablo
-------------