开发者

Disable excel prompt about quality loss when saving

开发者 https://www.devze.com 2023-03-23 19:50 出处:网络
I am working on macro for my proffesion in the army - I make graphs of air force saftey. I want to make my job easy so I want that the macro will change somethings - which it does right now and it wil

I am working on macro for my proffesion in the army - I make graphs of air force saftey.

I want to make my job easy so I want that the macro will change somethings - which it does right now and it will save the file 开发者_StackOverflow中文版and exit.

When I save the file it prompt about the quality loss and I want to bypass it.

Will

Application.DisplayAlerts = false 

work?

I cant test it on my computer because it doesnt happen to me here, and I just came back from the army - I will be back there in 3 days, just want to be sure that I have the right answer...

If it wont solve my problem what will?

Thanks!


Although turning off the alerts may hide the dialog from you, I am in complete agreement with Jon. It will mask any and all other errors that you most likely want to see.

Instead of masking the issue you should resolve the root cause of the issue. That is, save the Excel Workbook in a format that can handle the newer features or remove the newer features that are causing the issue.

In the Workbook.SaveAs method you pass a parameter named FileFormat. This is a value from the XLFileFormat enumeration. There are numerous file formats to choose from here but I suspect that you will want the XLFileFormat.xlOpenXMLWorkbookMacroEnabled one. This is the latest format for Excel 2007 (Not sure about 2010).

Good luck, Doug

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号