![]() |
Macro to Force Response in Dialog Box
Is there a way to force the response in a dialog box
within a VBA macro? For example, I need to perform a save as and overwrite an existing file. Of course, excel knows the file exists and asks if you want to perform the overwrite. Since multiple users will be performing the macro, I want to be able to force them to do the overwrite. Any ideas? Thanks! JenReyn |
Macro to Force Response in Dialog Box
JenReyn,
Setting DisplayAlerts set to False will skip the overwrite warning. Sub testit() Dim blnTemp As Boolean blnTemp = Application.DisplayAlerts Application.DisplayAlerts = False ThisWorkbook.SaveAs "C:\T\test.xls" Application.DisplayAlerts = blnTemp End Sub Rob "JenReyn" wrote in message ... Is there a way to force the response in a dialog box within a VBA macro? For example, I need to perform a save as and overwrite an existing file. Of course, excel knows the file exists and asks if you want to perform the overwrite. Since multiple users will be performing the macro, I want to be able to force them to do the overwrite. Any ideas? Thanks! JenReyn |
All times are GMT +1. The time now is 10:07 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com