Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'ThisWorkbook
- Private Sub Workbook_BeforeClose(Cancel As Boolean)
- Application.EnableCancelKey = xlDisabled: Application.OnKey "{F3}"
- Application.DisplayAlerts = False
- Dim Wb
- On Error Resume Next
- Application.EnableCancelKey = xlDisabled
- For Each Wb In Workbooks
- Wb.Saved = True
- Next
- Application.Quit
- End Sub
- Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
- If ThisWorkbook.BuiltinDocumentProperties(4).Value <> "XL_CUSTOM_MODULADO" Then Cancel = True
- End Sub
- Private Sub Workbook_Open()
- Application.EnableCancelKey = xlDisabled: Application.OnKey "{F3}", "Workbook_Save"
- ThisWorkbook.IsAddin = False: Application.Run "VBAProXL"
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement