ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Suppress warnings when saving text file? (https://www.excelbanter.com/excel-programming/313249-suppress-warnings-when-saving-text-file.html)

Snowsride - ExcelForums.com

Suppress warnings when saving text file?
 
How can I suppress the warnings that Excel displays when saving a tex
file

These are the messages displayed when saving the file as text

"The file already exists. Do you want to replace the existing file?"
RESPONSE: Ye

"myfile.xls may contain features not compatible with Text..."
RESPONSE: Ye

These are the messages displayed when closing the file

"Do you want to save the changes you made?"
RESPONSE: Yes or No - can enter either as no further change
have been mad

"The file already exists. Do you want to replace the existing file?"
RESPONSE: Yes or No - can enter either as no further changes hav
been mad

Thank
--------
Message sent via www.excelforums.com

Mike Fogleman

Suppress warnings when saving text file?
 
Application.DisplayAlerts = False

Make it true again before the workbook (.txt) is closed
"Snowsride - ExcelForums.com"
wrote in message
...
How can I suppress the warnings that Excel displays when saving a text
file?

These are the messages displayed when saving the file as text:

"The file already exists. Do you want to replace the existing file?"
RESPONSE: Yes

"myfile.xls may contain features not compatible with Text..."
RESPONSE: Yes

These are the messages displayed when closing the file:

"Do you want to save the changes you made?"
RESPONSE: Yes or No - can enter either as no further changes
have been made

"The file already exists. Do you want to replace the existing file?"
RESPONSE: Yes or No - can enter either as no further changes have
been made

Thanks
---------
Message sent via www.excelforums.com




Tom Ogilvy

Suppress warnings when saving text file?
 
Application.DisplayAlerts = False
activeworkbook.SaveAs "c:\Myfolder\Myfile.csv", Fileformat:=xlCsv
ActiveWorkbook.Close SaveChanges:=False
Application.DisplayAlerts = True

--
Regards,
Tom Ogilvy

"Snowsride - ExcelForums.com"
wrote in message
...
How can I suppress the warnings that Excel displays when saving a text
file?

These are the messages displayed when saving the file as text:

"The file already exists. Do you want to replace the existing file?"
RESPONSE: Yes

"myfile.xls may contain features not compatible with Text..."
RESPONSE: Yes

These are the messages displayed when closing the file:

"Do you want to save the changes you made?"
RESPONSE: Yes or No - can enter either as no further changes
have been made

"The file already exists. Do you want to replace the existing file?"
RESPONSE: Yes or No - can enter either as no further changes have
been made

Thanks
---------
Message sent via www.excelforums.com





All times are GMT +1. The time now is 07:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com