在 VBA 中从不同的模块调用子例程

有没有可能从一个 Module调用另一个函数?

我有以下密码:

Sub MAIN()
Call IDLE
End Sub
  • MAIN位于 Module1
  • IDLE位于 Module2中,定义为: Sub IDLE()
274895 次浏览

Prefix the call with Module2 (ex. Module2.IDLE). I'm assuming since you asked this that you have IDLE defined multiple times in the project, otherwise this shouldn't be necessary.