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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel automation: "oexcel.displayalerts" doesn't work

Status
Not open for further replies.

thomascd

Programmer
Mar 20, 2002
29
0
0
GB
Hi,
I am using ole automation with vfp, and on some machine, although I set from vfp oexcel.displayalerts=.f., they get this message during the process :
"do you want to save changes" or "do you want to overwrite the file ...".

Theses warnings should not happen with displayalerts=.f., but on some machines (winnt, and excel97), it does.

Any clue ?
 
set the workbook.saved property to .t. before closing. this will tell excel that there have been no changes to the file. Attitude is Everything
 
Thanks for this one. That's a work around.
 
thomascd

That is not a work around. It is the microsoft documented procedure to prevent the dialog box on unsavedfiles. Attitude is Everything
 
You're right for this one Danceman, but why does displayalert not work ?
and how to solve the problem with "do you want to overwrite the file..." without deleting it ?
 
from microsoft documentation.

if you don't want to be disturbed by prompts and alert messages while a macro is running; any time a message requires a response, Microsoft Excel chooses the default response.


NOTE the reference to MACRO. This appearsto be for running macro's only. Attitude is Everything
 
Hi !!
In my old code i found:
oexcel.Application.displayalerts=.f.
May be it is reason?
Monika Kind regards to you all from Warsaw !!!!!
 
Thank you everybody, your reponses helped me solve my problems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top