是否有可能为隐藏和取消隐藏工具栏禁用屏幕更新?
我有以下代码用于工作簿打开事件:
Private Sub Workbook_Open()
On Error Resume Next
Application.ScreenUpdating = False
ActiveWindow.DisplayGridlines = False
Loading.Show (vbModeless)
ActiveWindow.DisplayHeadings = False
Application.DisplayFormulaBar = False
Application.DisplayFullScreen = True
Dim RngCom As Range
Dim RngSig As Range
Application.Wait (Now + TimeValue("00:00:01"))
ThisWorkbook.Worksheets("MAIN").ScrollArea = "$A$1:$BL$45"
Call ECBRates
ThisWorkbook.Sheets("MAIN").CommercialBox.Clear
With ThisWorkbook.Sheets("Contact database")
For Each RngCom In .Range("B61:B77")
If RngCom.Value <> vbNullString Then ThisWorkbook.Sheets("MAIN").CommercialBox.AddItem RngCom.Value
Next RngCom
End With
ThisWorkbook.Sheets("MAIN").SignatureBox.Clear
With ThisWorkbook.Sheets("Contact database")
For Each RngSig In .Range("A61:A77")
If RngSig.Value <> vbNullString Then ThisWorkbook.Sheets("MAIN").SignatureBox.AddItem RngSig.Value
Next RngSig
End With
DoEvents
Call updateboxesInMAIN
Unload Loading
ThisWorkbook.Worksheets("MAIN").Activate
Application.ScreenUpdating = True
End Sub
每次打开工作簿时,我都会看到Excel如何隐藏工具栏并做一些事情。是否可以使其不可见并仅显示Loading.Show (vbModeless)
,直到一切准备就绪?
我已经尝试过Application.ScreenUpdating = False
,但是对于这段代码却没有太多帮助。