Deleting or Disabling code in Excel
Try this event code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI Then
Application.EnableEvents = False
End If
End Sub
Regards,
Stefi
€˛Cathy W€¯ ezt Ć*rta:
Hello. I have an excel template that contains code in the background. I
want to be able to either delete or disable the code when the user saves the
template as a .xls file. Any ideas? I have tried putting a version of
"delete code on save" function in the template, but then when I save the
template - it deletes the template code, which I don't want.
Thanks,
Cathy
|