EXCEL简易的进度条

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

在进度栏非常简单的进度控制,以下知道程序是否已完成。

Option Explicit 
 
Sub StatusBar() 
     
    Dim x               As Integer 
    Dim MyTimer         As Double 
     
     'Change this loop as needed.
    For x = 1 To 250 
         
         'Dummy Loop here just to waste time.
         'Replace this loop with your actual code.
        MyTimer = Timer 
        Do 
        Loop While Timer - MyTimer < 0.03 
         
        Application.StatusBar = "Progress: " & x & " of 250: " & Format(x / 250, "Percent") 
        DoEvents 
         
    Next x 
     
    Application.StatusBar = False 
     
End Sub 

 

转载于:https://my.oschina.net/tedzheng/blog/1931819

你可能感兴趣的:(EXCEL简易的进度条)