Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 09-30-2021, 08:37 AM
Logit Logit is offline Message to Protect Sheet after a command Windows 10 Message to Protect Sheet after a command Office 2007
Expert
 
Join Date: Jan 2017
Posts: 591
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

This macro, placed in the ThisWorkbook module, will save the workbook without notifying the user :

Code:
Option Explicit

Private Sub Workbook_BeforeClose(Cancel As Boolean)

    Application.DisplayAlerts = False
    ThisWorkbook.Save
   
    Application.DisplayAlerts = True
    Application.Quit

End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command button. To multi command Taylormations Word VBA 11 09-14-2020 02:39 AM
How do I un-protect docs I didn't protect? doctorduncan Word 4 05-30-2019 11:09 AM
Message to Protect Sheet after a command Outlook 2013 > Command to view the header without opening a suspicious message? Macintosh Outlook 2 02-04-2019 05:38 PM
Show table list by using chek box command and save document on sharepoint by using command button Zhibek Word VBA 3 08-16-2018 06:19 PM
Repair command results in error message srdiamond Office 0 03-01-2011 12:13 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft