Tuesday, January 25, 2005

Excel Automation: This action will cancel a pending refresh data command. Continue?

 
If you're automating Excel via the ActiveX/COM objects, you may notice an annoying msgbox saying

This action will cancel a pending refresh data command. Continue?

you can disable it via

Application.DisplayAlerts = False


Or if you're actually instantiating an object from outside of Excel VBA (e.g. from a C# console app), try

Excel.Application ExcelObj = new Excel.Application();
ExcelObj.DisplayAlerts = false;








Archives
September 2004   October 2004   November 2004   December 2004   January 2005   February 2005   March 2005   April 2005  

This page is powered by Blogger. Isn't yours?