title: IE 9 not accepting SendKeys
body: <p>I posted on <a href="https://stackoverflow.com/questions/11638933/excel-vba-sendkeys-not-causing-ie-9-to-save-download">IE 9 not accepting SendKeys to download a file</a>, but this problem is separate enough from the answer I received to justify another question. My problem is that I can't get IE 9 to accept any of the <code>SendKeys</code>. I have attempted <kbd>Page Down</kbd>, <kbd>Tab</kbd>, all of the <kbd>F#</kbd> keys, and none of them work. </p>
  
  <p>Here is the code I am using:</p>
  
  <pre><code>Dim ie As Object
  
  'This creates the IE object
  Sub initializeIE()
     'call this subprocedure to start internet explorer up
     Set ie = CreateObject("internetexplorer.application")
     pos = 1
  End Sub
  
  'Initialize the class object
  Private Sub Class_Initialize()
     initializeIE
  End Sub
  
  Function followLinkByText(thetext As String) As Boolean
    'clicks the first link that has the specified text
    Dim alink As Variant
  
    'Loops through every anchor in html document until specified text is found
    ' then clicks the link
    For Each alink In ie.document.Links
       If alink.innerHTML = thetext Then
            alink.Click
            'waitForLoad
            Application.Wait Now + TimeValue("00:00:01")
            Application.SendKeys "{PGDN}", True
            Application.SendKeys "{PGUP}", True
            'I've also tried calling it without Application before it
            SendKeys "{F1}", True
            SendKeys "{F2}", True
            'Etc... Each of these not being received by IE 9
  
            followLinkByText = True
            Exit Function
        End If
    Next
  
  End Function
  </code></pre>
  
  <p>I'm at a total loss because it seems like most forums or tutorials don't do anything different for IE 9. The IE object is created in a class module and initialized in the <code>Class_Initialize</code> sub. I am not sure if that helps any, but I really have no idea why this isn't working and any help on how to send keys to IE would be greatly appreciated.</p>