Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with Application.DisplayAlerts

148 views
Skip to first unread message

Jürgen Libon

unread,
Nov 4, 2003, 9:37:58 AM11/4/03
to
Hello,

we designed an Excel-Application for automized running
using VBA. Because of the case that this application runs
at night, all Message Boxes and other GUI-warnings should
be disabled and will be only logged . For that, we tried
the Application.DisplayAlerts-method using the false-setting.
The curious thing is that the attribute is shown to have
been set to false after that line of code it was set in the
direct and in the survaillance-window. But, as soon as we
point with our mouse on the
Application.DisplayAlerts-method in the code, the shown
information says, that it is set to true.
Also, the application acts like it is set to true.
Does anybody knows a possibility to disable all
"pop-up-messages" or is that a well-known-bug?

Thanks

Jürgen Libon

Stefan Onken

unread,
Nov 4, 2003, 12:39:45 PM11/4/03
to
hi Jürgen,
this is the german Newsgroup of Excel, so i explain it in german. Please
answer here if you want me to explain it in english.

Aus der VBA-Hilfe zu DisplayAlerts:
True, wenn Microsoft Excel bestimmte Warnungen und Meldungen anzeigt,...

Die Betonung liegt hier wohl auf bestimmte. Welche das sind, ist mir nicht
bekannt, aber getestet habe ich mal:

Application.DisplayAlerts = False
Range("A0").Select
-> Fehlermeldung wird angezeigt

Application.DisplayAlerts = False
ActiveWorkbook.Close
-> Bei einer nicht gespeicherten Datei wird der Dialog "Sollen ihre
Änderungen gespeichert werden?" beim Schließen nicht angezeigt.


mE mußt du in deinen Code mögliche Fehlerquellen behandeln.

Gruß
stefan


"Jürgen Libon" <jli...@web.de> schrieb im Newsbeitrag
news:0c3601c3a2e1$3db8fa20$a501...@phx.gbl...

Jürgen Libon

unread,
Nov 5, 2003, 4:29:43 AM11/5/03
to
Hi Stefan!

Ja, war mir bewußt, daß das hier die deutsche Fraktion der
Newsgroup ist, daqchte nur, sicher ist sicher. Leider ist
mir auch zu spät eingefallen, daß ich mein Problem ja auch
zweisprachig hätte darstellen können!

Zum DisplayAlerts-Problem:

Genau das, was bei Dir funktioniert, geht bei mir (in der
Arbeit) mit Excel97 nicht. Mir geht es speziell um das
Close-Event eines nicht-gespeicherten Workbooks. Und genau,
wenn ich DisplayAlerts auf false setze, frägt Excel dennoch
nach, ob gespeichert werden soll!
Bin ratlos! Hast Du vielleicht noch 'nen Tip????

Danke

Jürgen

>-----Originalnachricht-----

>.
>

stefan onken

unread,
Nov 5, 2003, 4:44:48 AM11/5/03
to
hallo Jürgen,probiers mal so:

zum Speichern der Änderungen:
ActiveWorkbook.Close savechanges:=True

False, wenn nicht gespeichert werden soll

Gruß
stefan

>-----Originalnachricht-----

>.
>

anon...@discussions.microsoft.com

unread,
Nov 28, 2003, 10:17:35 AM11/28/03
to
Hallo!

Erst einmal vielen Dank für die Mühe!
Habe mein Problem jetzt in den Griff bekommen, war
allerdings schon etwas kurios.
Dadurch, daß im Excelsheet in einer Zelle die
"ARBEITSTAG"-Funktion verwendet wurde, kam's zu dem
Problem. Habe die Funktion jetzt selbst als Makro
geschrieben, und plötzlich geht der Rest auch wieder, schon
etwas strange!

Have fun

Jürgen


>-----Originalnachricht-----

>.
>

0 new messages