Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Automation Problem: Want no Wanrings, Quit without Save

Status
Not open for further replies.

waldemar

Programmer
Nov 15, 2001
245
DE
I am automating Excel via Access, just reading out some data. I don't want the user to do any interaction while this is happening. However I get warnings (Unklinked references, DO you want to save changes, etc.) which I'd like to turn off.

ExcepApplication.DisplayAlerts False

(right after setting up the Excel Object) results in an error: "DisplayAlert can not be executed." Anybody any ideas?
 
No error no more; but the Dialogs still appear!...
 
Can you post a bit of your code illustrating both your displayalerts settings and the point where you get the messagebox?
Rob
 
No is no code there yet beyond opening and closing the excel file. The problem I have is that there seem to some external references in some cells. That arises a new question since I would like to get rid of them:

What kind of automation could I use to locate any cell references to external (non existing) xls-files and delete them?
 
I think the links question comes up quite a bit - I don't know the best answer, but asking it directly in a new thread will probably get you your answer.
On the displayalerts question - I would put a breakpoint in your code at the instruction that generates the alert, and then ask in the debug window

?excel.displayalerts

(where excel is the name of your application object)

to see if your assignment stuck. Depending on what you find, I'd take different approaches from there on.
Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top