![]() |
What do you do when DisplayAlert does not work in VBA?
I have an Excel workbook that is created using VBA. I have set DisplayAlert
to False just before I save the Workbook. This does not seem to work as, the Save Dialog Box keeps coming up. I do not want this because I want to automate the whole process. Any suggestions? |
What do you do when DisplayAlert does not work in VBA?
Hi M. Hussaini
If you want to close the file after you save with VBA and not want to see Save Dialog Box Then you can use this with code ActiveWorkbook.Close False If you have set a reference (WB ) to the file you can de WB.Close False -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "M. Hussaini" wrote in message ... I have an Excel workbook that is created using VBA. I have set DisplayAlert to False just before I save the Workbook. This does not seem to work as, the Save Dialog Box keeps coming up. I do not want this because I want to automate the whole process. Any suggestions? |
What do you do when DisplayAlert does not work in VBA?
Are you using this line? Application.DisplayAlerts = False
DisplayAlerts by itself does nothing. You can also use this method with no message. ActiveWorkbook.Close SaveChanges:=True Gord Dibben MS Excel MVP On Thu, 1 Feb 2007 14:08:01 -0800, M. Hussaini wrote: I have an Excel workbook that is created using VBA. I have set DisplayAlert to False just before I save the Workbook. This does not seem to work as, the Save Dialog Box keeps coming up. I do not want this because I want to automate the whole process. Any suggestions? |
What do you do when DisplayAlert does not work in VBA?
The first time you save the workbook, it needs a path and filename. Use
SaveAs instead of Save, and provide a full name. This should avoid the Save As dialog popping up. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "M. Hussaini" wrote in message ... I have an Excel workbook that is created using VBA. I have set DisplayAlert to False just before I save the Workbook. This does not seem to work as, the Save Dialog Box keeps coming up. I do not want this because I want to automate the whole process. Any suggestions? |
All times are GMT +1. The time now is 02:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com