Status Bar Progress Meter not showing messages

╄→гoц情女王★ 提交于 2019-12-02 09:35:22

The reason you don't see them is that they are immediately overwritten by the next StatusBar message.

Take this for example:

   'Eigth Message
   Application.StatusBar = String(5, ChrW(9609)) & "All Files Extracted..."
   'After the previous message has displayed for zero seconds, 
   'Relinquish the StatusBar
   Application.StatusBar = False

You're displaying a message and erasing it right away.

Same idea for your first message. The statements that occur in between probably execute in less than a millisecond, so that's how long your first message will show; hence you don't see it. Which, in a way, makes total sense, because there is no need for a progress meter to be displayed if progress is instantaneous.

The example in the link you provide uses Application.Wait statements to force the program to wait while the progress bare is being shown. But that's just for illustration purposes; you would never slow down your actual program on purpose like that.


The reason the progress bar isn't getting longer and longer is that you are explicitly telling it to stay the same length:

String(5, ChrW(9609)) 

will always return a progress bar that is five characters long: ▉▉▉▉▉. The example in the link you provide makes it grow from 5 to 10 to 15.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!