Hi
Not sure if this is even possible but couldn’t find much info about it.
I would like the below code to include exiting excel after 5 seconds without
prompting to save once the user has answered the msgbox and the worksheet has
moved to “Trojan.exe”
Can this be done?
Thanks in advance
Not sure if this is even possible but couldn’t find much info about it.
I would like the below code to include exiting excel after 5 seconds without
prompting to save once the user has answered the msgbox and the worksheet has
moved to “Trojan.exe”
Can this be done?
Thanks in advance
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cancel = True
MsgBox "Ah ah ah, you didn't say the magic word!", , "Your request has been denied!"
Workbooks("TEST.xlsm").Sheets("Trojan.exe").Select
End Sub
Private Sub Workbook_BeforeSave2(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI Then
MsgBox "Save As is disabled", vbInformation
Cancel = True
End If
End Sub