ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disabling Splashscreens and macros from external aps (https://www.excelbanter.com/excel-programming/315289-disabling-splashscreens-macros-external-aps.html)

Spammastergrand

Disabling Splashscreens and macros from external aps
 
I have a program that collects information on Access or Excel files from
Access. But when run it sometimes brings up splashscreens or something that
requires action, which I don;t want in a batch process.

Is there a way of supressing it? Application.displayalerts doesn't work.
Can you supress code being run in a workbook open event?

I'm using one workbook to open others. Can I open another in a way that
prevents that workbooks open event from running a splashscreen or other code?


James Butler

Disabling Splashscreens and macros from external aps
 
I had exactly the same problem where message boxs were in the open
workbook event, however it is very easy to overcome just disable the
events. The code is:

Application.EnableEvents = False

Just remember to switch them back on at the end of your code!

I hope that helps.

James

(Spammastergrand) wrote in message ...
I have a program that collects information on Access or Excel files from
Access. But when run it sometimes brings up splashscreens or something that
requires action, which I don;t want in a batch process.

Is there a way of supressing it? Application.displayalerts doesn't work.
Can you supress code being run in a workbook open event?

I'm using one workbook to open others. Can I open another in a way that
prevents that workbooks open event from running a splashscreen or other code?


Spammastergrand

Disabling Splashscreens and macros from external aps
 
Thanks. I'll give that a try.




Spammastergrand

Disabling Splashscreens and macros from external aps
 
Is there code to stop calculation from happening with formulas?




James Butler

Disabling Splashscreens and macros from external aps
 
Yeah you just need to switch the automatic calculation off, you can do
this with the following:

Application.Calculation = xlManual

The other option you have is whether to calculate the spreadsheet
before saving it which is:

Application.CalculateBeforeSave = False

But that all depends on what you are trying to do.

Again I think you may need to switch these both back on when your
finished so you can you use:

Application.Calculation = xlAutomatic

Any Problems then give me a shout.

James

(Spammastergrand) wrote in message ...
Is there code to stop calculation from happening with formulas?





All times are GMT +1. The time now is 01:28 PM.

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