ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Response to menu in VBA (https://www.excelbanter.com/excel-programming/323445-response-menu-vba.html)

Rocco[_2_]

Response to menu in VBA
 
Hi,
I have macros which save the file name "temp.xls" which already exists. I
want the
macro to replace the existing file without waiting for the user to input a
response.
How do I write this in VBA ?
Thanks in advance,
Rocco

Bob Phillips[_6_]

Response to menu in VBA
 
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs FileName:="temp.xls"
Application.DisplayAlerts = True

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Rocco" wrote in message
...
Hi,
I have macros which save the file name "temp.xls" which already exists. I
want the
macro to replace the existing file without waiting for the user to input a
response.
How do I write this in VBA ?
Thanks in advance,
Rocco





All times are GMT +1. The time now is 12:22 PM.

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