title: VBA to Activate Internet Explorer Window
body: <p>I'm making a macro that opens Internet Explorer, navigates and logs into a website. Everything works fine, but I need to bring the IE Window up front, and activate it, so I can use <code>SendKeys</code>on it.
  I've found websites and videos with different approaches on a command called <code>AppActivate</code> and i've tried many of them, but even if I copy the entire code (which works for the author) it won't work for me, I always get an error: Invalid Procedure Call or Argument - Error 5</p>
  
  <p>A list of everything I've found and tried:</p>
  
  <pre><code>Dim objIE As InternetExplorerMedium
  Set objIE = New InternetExplorerMedium
  objIE.navigate "http://google.com"
  'makes it visible, but not active
  objIE.Visible = True
  
  'A list of ways I've tried:
  objIE.AppActivate "Google - Internet Explorer"
  AppActivate "Google - internet Explorer"
  'the above supposedly looks for the title of the page
  AppActivate objIE
  AppActivate (objIE)
  AppActivate "objIE"
  </code></pre>
  
  <p>observations: I'm running this inside Excel 2013 and I'm using Windows 7 with IE 11.</p>