Trouble with SaveAs Filename


Posted by Dominik on March 30, 2001 7:54 AM

When the following lines of code are executed:

ActiveWorkbook.SaveAs FileName:="C:\win32app\exceed\user\Grab.EBS", FileFormat:=xlTextPrinter, CreateBackup:=False
ActiveWindow.Close

Excel tends to prompt me to save on both lines, with the default for the former being "No" and for the latter being "Yes", identically contrary to what I need it to do. Because of this, I can't use Application.DisplayAlerts = False. Is there another way to reset the defaults to keep those pesky boxes from popping up?

Dominik



Posted by mseyf on March 30, 2001 8:16 AM

Dominik:

Try playing with

ActiveWorkbook.Saved = True
and
ActiveWorkbook.Saved = False

maybe

ActiveWorkbook.SaveAs FileName:="C:\win32app\exceed\user\Grab.EBS", FileFormat:=xlTextPrinter, CreateBackup:=False
ActiveWorkbook.Saved = True
ActiveWindow.Close

HTH

Mark