0
ActiveSheet.Unprotect
Cells.CheckSpelling SpellLang:=2057
If Range("F4").Value = 1 Then                                                  
    MsgBox "MARKED UP BUDGET does not equal TOTAL! Please amend as required"
    Application.Run "LATESTMEDIAPLANVERSION.xlsm!final"

我目前有两段代码会产生警告框。但是目前这些弹出但不会将您从宏中弹出.. IE 我只想确保该行:

Application.Run......

只有在不提示警告框时才到达。什么是正确的代码?

4

1 回答 1

0

将您的代码更改为:

ActiveSheet.Unprotect

Cells.CheckSpelling SpellLang:=2057


If Range("F4").Value = 1 Then                                                  

     MsgBox "MARKED UP BUDGET does not equal TOTAL! Please amend as required"
     Exit Sub

else

    Application.Run "LATESTMEDIAPLANVERSION.xlsm!final"

end if
于 2013-02-11T13:19:01.657 回答