Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  2. On Error Resume Next
  3. Application.DisplayAlerts = False
  4. Sheets("Picking").Delete
  5. Sheets("Ordering").Delete
  6. Clear_UI
  7. Dim UI As Worksheet
  8. Set UI = Sheets("User Interface")
  9. With UI
  10. .Shapes("Menu_StartNewEvent").OnAction = ""
  11. .Shapes("Menu_UpdateEvent").OnAction = ""
  12. .Shapes("Menu_ProduceSheets").OnAction = ""
  13. .Shapes("Menu_CountIn").OnAction = ""
  14. .Shapes("Menu_EditPackages").OnAction = ""
  15. .Shapes("Menu_EditCocktails").OnAction = ""
  16. .Shapes("Menu_EditInventory").OnAction = ""
  17. End With
  18. Unhide_Them
  19. Set UI = Sheets("Inventory Editor")
  20. UI.Shapes("SaveButton").OnAction = ""
  21. Set UI = Sheets("Cocktail Editor")
  22. UI.Shapes("SaveButton").OnAction = ""
  23. Set UI = Sheets("Package Editor")
  24. UI.Shapes("SaveButton").OnAction = ""
  25. Hide_Them
  26. Application.DisplayAlerts = True
  27. ThisWorkbook.Save
  28. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement