在复制和粘贴时隐藏工作表
我正在开发一些Excel VBA例程,它们从一张表中获取数据,生成其他工作簿,然后在它们之间复制各种表单和数据。
我正在做许多工作簿/工作表之间来回切换。
是否有一个简单的方法来隐藏每一个到最后,并显示某种进度条?
当我需要复制/粘贴时,我不想隐藏/显示东西…我希望excel在背景中静静地做任何事情。
任何方式来做到这一点?
您可以暂时禁用ScreenUpdating
Sub SilentRunning() Application.ScreenUpdating = False ' ' do your thing ' Application.ScreenUpdating = True End Sub
@ garys-student在禁用屏幕更新的情况下确定它 – 如果你想更新一个特别是antsy用户的进度条,你可以使用这个:
Application.StatusBar = "Processing row " & Idx & " of " & _ LastRow & "... " & Format(Idx / LastRow, "0%") & " complete" ' ' do other stuff ' Application.StatusBar = False 'reset the status bar