开发者

Excel waiting for one macro to finish before calling another

I'm using Application run to call several macros in order like this.

Sub Run_A开发者_开发知识库ll_Macros()
  Application.Run ("Macro_1")
  Application.Run ("Macro_1")
End Sub

When I start Run_All_Macros, all the macros run in parallel. Is there a way to wait for the first macro to complete before the second is started?


If you step through the macros (Use F8) you should see that they are running in order and not simultaneously.

I use the step through method to watch exactly what is happening and in what order. I often find I've included an error in logic, or something else, that doesn't give the desired result.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜