暂停宏然后在工作表上工作,然后恢复宏

时间:2013-09-28 15:00:23

标签: excel excel-vba excel-2007 vba

如何在工作表上暂停宏工作创建多个图形,研究它们,研究各种单元格然后恢复宏?

我尝试使用暂停宏的MsgBox,但不会让我在工作表上工作。我做了很多谷歌搜索无济于事。

1 个答案:

答案 0 :(得分:2)

这是一种典型的机制:

Sub TwoParts()
    '     do the first part
    MsgBox "Enter a value in A1 when done"
    While [A1] = ""
        DoEvents
    Wend
    MsgBox "Proceeding with second part actions"
    '     do other stuff
End Sub

我们:

  • 做一些事情
  • 告诉用户做他的事情
  • 等到用户填写A1
  • 做第二部分
相关问题