【问题标题】:How to use statusbar in excel vba on mac如何在mac上的excel vba中使用状态栏
【发布时间】:2015-03-16 15:03:33
【问题描述】:

我正在尝试设置一个进度条,以便查看我的 sub 是否正在运行,如果我设法冻结了 excel。我正在查看here 的答案之一,但它不起作用。

这是我所拥有的:

Dim n As Integer
With Worksheets("Data_History")
    Set starting_cell_range = .Range(find_last_column("Data_History"))
    For n = 0 To 18
        starting_cell_range.Offset(n, 1) = final_array(n)
        Application.StatusBar = "Progress: " & n & " of 18" & Format(n / 18, "0%")

    Next n
    Application.StatusBar = False

End With

因为我使用的是 Mac,所以它无法正常工作吗?

【问题讨论】:

    标签: excel vba statusbar


    【解决方案1】:

    我假设您有一个 Application.DisplayStatusBar 并且它是可见的?尝试在此处添加 DoEvents:

    ....
    DoEvents
    Application.StatusBar = "Progress: " & n & " of 18" & Format(n / 18, "0%")
    ....
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-06-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-26
      相关资源
      最近更新 更多