Hi Guys
I am using the code below but when the message box comes up i would like it to close the file when the user clicks ok. I think i need to add the line "Me.Close"
but i am not sure where to put it. Or do i need to put another other line some where else?
Thanks for your help in advanced.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "Did you really think i would allow you to steal my work and call it your own? DO YOUR OWN WORK"
Cancel = True
If SaveAsUI Then SaveAsUI = False
End Sub
I am using the code below but when the message box comes up i would like it to close the file when the user clicks ok. I think i need to add the line "Me.Close"
but i am not sure where to put it. Or do i need to put another other line some where else?
Thanks for your help in advanced.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "Did you really think i would allow you to steal my work and call it your own? DO YOUR OWN WORK"
Cancel = True
If SaveAsUI Then SaveAsUI = False
End Sub