PDA

View Full Version : Solved: Disable all saving



Blackie50
02-09-2011, 05:48 AM
Picked up following code but as it disables all saving it won't save the code.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
' Following line will prevent all saving
Cancel = True
End Sub


How do I get it to save the code in the workbook module?

thanks
Jon

mancubus
02-09-2011, 06:40 AM
hi.

open workbook macros disabled, then save.

Blackie50
02-09-2011, 07:21 AM
Cheers - really simple

regards
Jon