-
Hi,
I' ve got a problem zith excel '97.
I' ve opened a text file in excel,
made some changes and want to do a save as
from the open file with the same name but
with an other fileformat. The code works but
excel application comes with a msgbox, asking
if I'm sure a want to save the file, because
it already exists. How can I catch that msgbox?
I don't want the user to see this msgbox.
What do I have to do...? Can anybody help me
with this little problem?
This is a piece of my code
appExcel.ActiveWorkbook.SaveAs _
FileName:=TextFile, _
FileFormat:=xlTextWindows, _
CreateBackup:=False, _
Accessmode:=xlExclusive, _
ConflictResolution:=xlLocalSessionChanges
appExcel.ActiveWorkbook.Close _
Savechanges:=False
appExcel.Application.Quit
-
Hi !!!
Use the Method
appEXCEL.application.DisplayAlerts = false
before you save the file.
Now Excel won't display any error message anymore
till you set them back to true.
Be carful with this !!!
cu TheOnly
-
Thanks very much, it works...
my code is now...
appExcel.Application.DisplayAlerts = False
appExcel.ActiveWorkbook.SaveAs _
FileName:=TextFile, _
FileFormat:=xlTextWindows, _
CreateBackup:=False, _
Accessmode:=xlExclusive, _
ConflictResolution:=xlLocalSessionChanges
appExcel.Application.DisplayAlerts = True
And the message is gone...