title: Get existing IE via VBA
body: <p>My goal is to scrape data off multiple webpages on the same site into Excel. I have these pages open in tabs within IE8. I have no other IE windows open.</p>
  
  <p>I have tried the following to open IE:</p>
  
  <pre><code>AppActivate "Microsoft Internet Explorer provided by [my company]"
  ' It loses focus, the titlebar flashes for a fraction of a second 
  ' .. another code ..
  Dim ShellApp
  Set ShellApp = CreateObject("Shell.Application")
  Dim ShellWindows
  Set ShellWindows = ShellApp.Windows()
  Dim i
  For i = 0 To ShellWindows.Count - 1
      If InStr(ShellWindows.Item(i).FullName, "iexplore.exe") &lt;&gt; 0 Then
          Set IEObject = ShellWindows.Item(i) 
      End If
  Next
  ' Did absolutely nothing, grabbed this code from another solution on stackoverflow
  </code></pre>
  
  <p>I also tried GetObject (I do not want to use the CreateObject method) as follows</p>
  
  <pre><code>dim ie As InternetExplorer 'also tried As Object and other variation
  set ie = GetObject(, "InternetExplorer.Application")
  'However this is not workable due to security risks and Microsoft 
  ' disabled GetObject for IE by design. 
  </code></pre>
  
  <p>The reason I don't want to use CreateObject or any of the variation is because I already have the tabs open ready to be scraped. AppActivate works with Microsoft Excel, but not IE. I cannot do exact titlebars as follows:</p>
  
  <pre><code>AppActivate "Website name - name page - Microsoft Internet Explorer provided by [my company]"
  </code></pre>
  
  <p>The reason I can't use this because of the tabs with varying named pages, changing the title constantly. I also tried:</p>
  
  <pre><code>AppActivate InternetExplorer.Application
  
  AppActivate InternetExplorer
  
  AppActivate " - Microsoft Internet Explorer"
  
  AppActivate "Microsoft Internet Explorer"
  </code></pre>
  
  <p>All of the above either are not recognized or merely flash for a fraction of a second (as mentioned in first code). I have tried other methods but they create a new IE instance when I want to use the existing IE with opened multi-tabs.</p>
  
  <p>In a different code:</p>
  
  <pre><code>AppActivate "[name of page] - Microsoft Internet Explorer provided by [my company]"
  </code></pre>
  
  <p>worked until I changed it to try and reference IE, no matter what page I'm on. Then the old AppActivate code will no longer work. I broke it. It was dumb of me to not have a back up.</p>
  
  <p>System I am running:</p>
  
  <p>Windows 7, IE8 (I'm waiting on my company to upgrade), Excel 2010</p>