title: vba skip popup message box in webpage
body: <p>I’m a beginner and desperately seeking for help. I would kindly request your support and apologize in advance for the poor wording and eventual lack of info (again, I’m a rookie). I’m building an Excel macro to fill in a (private) webpage and after filling in the requested data, I’m also able to call the javascript function that submits the data/form. However, it appears a “Message from webpage” that I’m unable to confirm (always "ok"/enter) or simple skip. The Macro just stops and I can’t do anything without clicking manually in the “ok” button. I’ve spend several hours searching and trying different solutions but nothing seems to work, probably due to my poor skills. Hereunder I send the code that is beating me hard (hope is enough). Looking forward for your help</p>
  
  <p>MY CODE</p>
  
  <pre><code>DIM HTMLdoc As MSHTML.HTMLDocument
  
  ' Submits data but gets stuck in the popup message box
  HTMLdoc.all.Item
  Call HTMLdoc.parentWindow.execScript("licitarLeilao();", "JScript")
  </code></pre>
  
  <p>WEBPAGE</p>
  
  <pre><code>...
  function licitarLeilao(){
      var ultimaLicitacao = document.getElementById('ultimaLicitacao').value;
      var valorLicitar = document.getElementById('valorLicitar').value;
  
      if(ultimaLicitacao == ' -- '){
          ultimaLicitacao = document.getElementById('valorBase').value;
      }
  
      var racio = toNum(valorLicitar) / toNum(ultimaLicitacao);
  
      if (racio &lt; 1.5) {
          if(!confirm('Confirma o valor de licitação (' + valorLicitar +' eur.) do leilão?')){
              return false;
          }   
      }
      else {  
          if(!confirm('ATENÇÃO!! O valor de licitação é muito superior à última licitação. \n\n Confirma o valor de licitação (' + valorLicitar +' eur.) do leilão?')){
              return false;
          }
      }   
  
      var flow = document.getElementById('flow');
      flow.value = '8';
  
      document.formulario.submit();
  }
  </code></pre>