excel - How to step out after each warning message? -
activesheet.unprotect cells.checkspelling spelllang:=2057 if range("f4").value = 1 msgbox "marked budget not equal total! please amend required" application.run "latestmediaplanversion.xlsm!final"
i have 2 pieces of code yield warning boxes. @ moment these pop don't eject macro.. i.e want ensure line:
application.run......
is reached if don't prompt warning box. the right code this?.
change code to:
activesheet.unprotect cells.checkspelling spelllang:=2057 if range("f4").value = 1 msgbox "marked budget not equal total! please amend required" exit sub else application.run "latestmediaplanversion.xlsm!final" end if
excel vba
No comments:
Post a Comment