[英]Excel VBA UserForm, progress bar
I've created a userform that should act like progress toolbar and show me my actual progress in percent. 我创建了一个用户表单,它应该像进度工具栏一样,并以百分比显示我的实际进度。
I want to show my tool bar in a for loop. 我想在for循环中显示我的工具栏。 But the for loop doesn't go on only if i click away the userform.
但只有当我点击用户窗体时,for循环才会继续。 What i am doing wrong?
我做错了什么?
For k = 1 To 300
pctcompl = k * 100 / 300
UserForm1.Text.Caption = pctcompl & "% Completed"
UserForm1.Bar.Width = pctcompl * 2
DoEvents
UserForm1.Show
Next k
Let me google that for you :-) 让我谷歌那个为你:-)
frmTest.Show vbModeless frmTest.Show vbModeless
http://www.mrexcel.com/forum/excel-questions/41673-userform-stops-macro-how-continue-w-still-visible.html http://www.mrexcel.com/forum/excel-questions/41673-userform-stops-macro-how-continue-w-still-visible.html
Works for me :-) 适合我:-)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.