Hello,
I have a workbook includes several macros. The file issupposed to be used in several computers with several users.
In order to force users to “enable macros”, I added aworksheet named “open & close”. There is a note in this sheet givesinformation to users to enable macros. I also have a VBA code for before closingthat hide all sheets except “open & close”. Using this before closing VBAcode the file always open and close in the same sheet.
I want to hide the Save/Don’t Save message at closing stage.There is no matter to save or not to save the changes because the file issupposed to be used for some reports. I added this code but it doesn’t work.
<code>SubCloseBook()</code>
<code> Application.DisplayAlerts = False</code>
<code> ActiveWorkbook.Close</code>
<code> Application.DisplayAlerts = True</code>
<code>End Sub</code>
I also added this code to before closing code and it didn’twork as well. I believe that combination of before closing and closing code cause the issue that still I get the save/don't save question box.
Could you please help me with this issue? I want to have acode to hide all sheets except one in closing stage and don’t display thesave/don’t save message. Both save and don’t save options work for me as adefault for closing and saving.
Many thanks in advance.
I have a workbook includes several macros. The file issupposed to be used in several computers with several users.
In order to force users to “enable macros”, I added aworksheet named “open & close”. There is a note in this sheet givesinformation to users to enable macros. I also have a VBA code for before closingthat hide all sheets except “open & close”. Using this before closing VBAcode the file always open and close in the same sheet.
I want to hide the Save/Don’t Save message at closing stage.There is no matter to save or not to save the changes because the file issupposed to be used for some reports. I added this code but it doesn’t work.
<code>SubCloseBook()</code>
<code> Application.DisplayAlerts = False</code>
<code> ActiveWorkbook.Close</code>
<code> Application.DisplayAlerts = True</code>
<code>End Sub</code>
I also added this code to before closing code and it didn’twork as well. I believe that combination of before closing and closing code cause the issue that still I get the save/don't save question box.
Could you please help me with this issue? I want to have acode to hide all sheets except one in closing stage and don’t display thesave/don’t save message. Both save and don’t save options work for me as adefault for closing and saving.
Many thanks in advance.