Sub prelim() MsgboX "Hello World" End Sub Sub Main() Call prelim End Sub
在上面的代码中,Sub prelim不能被编辑。当我运行Sub prelim时,我希望msgbox,但当我运行Sub Main时,我不希望消息框弹出。怎么做?
Sub prelim
Sub Main
jdzmm42g1#
如果不更改Sub prelim,则无法执行此操作
Sub prelim(Optional silent As Boolean = True) If Not silent Then MsgBox "Hello World" End Sub Sub Main() prelim True 'no msgbox prelim False 'with msgbox prelim 'no msgbx End Sub
1条答案
按热度按时间jdzmm42g1#
如果不更改
Sub prelim
,则无法执行此操作