Automatically Close Dialog Boxes

C

chriskane

I am writing an excel macro (first time doing this) which pulls i
company credit ratings from a Bloomberg terminal, compares the credi
ratings with ratings in a database, and writes any updated credi
ratings into the database. The code works fine, but now I want to hav
the sequence run once a week (say, every Monday morning). This seem
easy enough to do by setting a windows event that will open the exce
workbook every Monday morning and then setting the macro sequence t
execute when the workbook opens. Then I would just add in a lin
telling the workbook to save itself and close excel once the sequenc
finishes.

The problem is that several dialog boxes appear when the workbook i
open. The first asks the user whether to enable macros. I've gotte
around this by setting low security so that macros are always enabled.
The next dialog box to appear asks the user whether to allow thi
workbook to pull in values from another workbook. Then there i
another dialog box that asks the user to approve opening an externa
program that pulls in data from Bloomberg.

I need to find some way to automatically approve these dialog boxes.
I've tried playing with the SendKeys command, but with no luck
 
A

Alan

The next dialog box to appear asks the user whether to allow this
workbook to pull in values from another workbook
..
This can be overcome by Tools > Options > Edit > Uncheck > 'Ask to
automaticaly update links'

Not sure about the last one!

Sorry,
Regards,
Alan.
 
A

Alan

Not sure if this will work but try

Application.DisplayAlerts = False
'Your code here
Application.DisplayAlerts = True

Regards,
Alan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top