简体   繁体   中英

Show built-in progress bar when application.screenupdate = false?

I was just wondering if it's possible to still show the built-in progress bar, while i use this setting:

Application.ScreenUpdating = False

I know that I can make my own progress bar by using a UserForm, but instead I would prefer to use the built-in

Application.StatusBar

to display the messages that I programmed and the built-in progress bar to show the file open progress, like Excel would show if ScreenUpdating was enabled.

Is this possible? Should I program my own Progress Bar instead? It's more of a performance question, I'd rather not do it if it will make my program finish in 1m35s instead 1m30s.

No, it's not possible. Think it through - you told Excel not to update the user interface, so clearly you can't then update the user interface. If you want to display the progress, you'll either have to allow Excel to update the U/I or create your own progress bar.

The fastest way, of course, is not to bother to display the progress. If performance is so important that the difference between 1m30s and 1m35s matters, don't display progress information and complete in 1m29s or less instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM