title: Issue with MsgBox added under for loop
body: <p>I have the following code added under a function and also under for loop.</p>
  
  <pre><code>If Not setFcType(agt, ma, sma) Then
      fcComm1 = "Error"
      MsgBox "Entered Agt/Ma/Sma value is incorrrect", vbOKOnly
      Exit Function
  End If
  </code></pre>
  
  <p>When i enter any values in excel, I get this code working able to observe the MsgBox, However It keeps on showing the MsgBox (even upon pressing OK) until the whole excel calculated all the cells (I have huge datas in my excel and lot of functions running behind).
  Is there any way overcome this issue ? </p>