Add-ins / Autosave


Posted by Jason Wiedmayer on September 10, 2001 7:28 AM

Does anyboy know how to turn off auto-save in excel using visual basic code?

Posted by Dax on September 10, 2001 11:58 AM

The easiest way to do this is to remove the add-in altogether at the start of your macro and then install it again at the end e.g.

Sub RemoveAutoSave()
AddIns("Autosave Add-in").Installed = False

'Rest of your macro

AddIns("Autosave Add-in").Installed = True

End Sub

Regards,
Dax.



Posted by Jason WIedmayer on September 11, 2001 5:00 AM

I tried that but I would get a dialog box asking to continue, pause or step. I did not want the user to be able to stop it so I ended up with this piece of code. For Each Item In AddIns

If Item.Name = "AUTOSAVE.XLA" Then
Workbooks(Item.Name).Close
End If
Next Item