ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Control save prompts in VB code (https://www.excelbanter.com/excel-programming/335328-control-save-prompts-vbulletin-code.html)

bobcat

Control save prompts in VB code
 
How do I control the prompts so end users do not have to answer "enable
macros" questions and "There is alraeady a file saving it will overwrite it

STEVE BELL

Control save prompts in VB code
 
The only ways (that I know) to do this a

Use a certificate (self cert)
or
Build an add-in with all the code needed and have the user add it
to there add-ins. These open behind the scene each time Excel is opened.
or
Build a workbook with all the code and have the user save it in the XlStart
folder.
These also open behind the scene each time Excel is opened.

Than you can have your "special" workbooks have code to open any file
without prompts.

--
steveB

Remove "AYN" from email to respond
"bobcat" wrote in message
...
How do I control the prompts so end users do not have to answer "enable
macros" questions and "There is alraeady a file saving it will overwrite
it




Graham Standring

Control save prompts in VB code
 
Using the following code should work:

Application.DisplayAlerts = False

If you only want to disable the prompts for one function only, say when
closing a workbook you can then enable them again afterwards as follows:

Application.DisplayAlerts = False
Workbooks("BOOK1.XLS").Close
Application.DisplayAlerts = True

I hope that helps.

Graham




bobcat wrote:
How do I control the prompts so end users do not have to answer "enable
macros" questions and "There is alraeady a file saving it will overwrite it




All times are GMT +1. The time now is 05:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com