Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
chriskane
 
Posts: n/a
Default Automatically Close Dialog Boxes


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

The problem is that several dialog boxes appear when the workbook is
open. The first asks the user whether to enable macros. I've gotten
around this by setting low security so that macros are always enabled.
The next dialog box to appear asks the user whether to allow this
workbook to pull in values from another workbook. Then there is
another dialog box that asks the user to approve opening an external
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.


--
chriskane
------------------------------------------------------------------------
chriskane's Profile: http://www.excelforum.com/member.php...o&userid=26068
View this thread: http://www.excelforum.com/showthread...hreadid=394037

  #2   Report Post  
Alan
 
Posts: n/a
Default

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.
"chriskane" wrote
in message ...

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

The problem is that several dialog boxes appear when the workbook is
open. The first asks the user whether to enable macros. I've gotten
around this by setting low security so that macros are always enabled.
The next dialog box to appear asks the user whether to allow this
workbook to pull in values from another workbook. Then there is
another dialog box that asks the user to approve opening an external
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.


--
chriskane
------------------------------------------------------------------------
chriskane's Profile:
http://www.excelforum.com/member.php...o&userid=26068
View this thread: http://www.excelforum.com/showthread...hreadid=394037



  #3   Report Post  
Alan
 
Posts: n/a
Default

Not sure if this will work but try

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

Regards,
Alan.
"Alan" wrote in message
...
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.
"chriskane" wrote
in message ...

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

The problem is that several dialog boxes appear when the workbook is
open. The first asks the user whether to enable macros. I've gotten
around this by setting low security so that macros are always enabled.
The next dialog box to appear asks the user whether to allow this
workbook to pull in values from another workbook. Then there is
another dialog box that asks the user to approve opening an external
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.


--
chriskane
------------------------------------------------------------------------
chriskane's Profile:
http://www.excelforum.com/member.php...o&userid=26068
View this thread:
http://www.excelforum.com/showthread...hreadid=394037





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dialog boxes webster Excel Discussion (Misc queries) 5 July 9th 05 11:16 AM
Excel shoud not close all active books when clicking close button technomike Excel Discussion (Misc queries) 0 June 10th 05 05:35 PM
Excel's Dialog Box Dialog Box Excel Discussion (Misc queries) 1 February 12th 05 12:53 PM
Copying and Pasting in dialog boxes Robert Excel Discussion (Misc queries) 1 January 19th 05 11:22 PM
How can I change the size of dialog boxes? Dale Hildebrand Excel Discussion (Misc queries) 2 December 2nd 04 05:12 PM


All times are GMT +1. The time now is 09:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"