title: How do I bring focus to a msgbox?
body: <pre><code>Private Sub CommandButton1_Click()
  Dim i As Long
  Dim xreply As Integer
  Dim names As Long
  
  Dim IE As Object
  
  i = ActiveSheet.Range("D1").Value
  
  While Not IsEmpty(ActiveSheet.Range("A" &amp; i).Value)
  
  Set IE = CreateObject("InternetExplorer.Application")
  IE.Visible = True
  IE.Navigate "WEBSITENAME" &amp; ActiveSheet.Range("A" &amp; i).Value 
  
  'wait for webpage to load
  Do
      DoEvents
  Loop Until IE.READYSTATE = 4
  
  'pagedown to the info
  Application.SendKeys "{PGDN}", True
  Application.SendKeys "{PGDN}", True
  
  xreply = MsgBox("Is this page for women? Record:" &amp; i, vbYesNo, "Checker")
  Application.Visible = True
  AppActivate ("Checker")
  
  If xreply = vbYes Then
      ActiveSheet.Range("B" &amp; i).Value = "Yes"
      Else
      ActiveSheet.Range("B" &amp; i).Value = "No"
  End If
  
  'quit IE
  IE.Quit
  i = i + 1
  ActiveSheet.Range("D1").Value = i
  Wend
  
  End Sub
  </code></pre>
  
  <p>Above is my code. I am trying to bring the msgbox to the front, yet I can not get AppActivate to do so. </p>
  
  <p>When I leave AppActivate("Checker") I get: 
  Run-Time error '5':
  Invalid procedure call argument, help? </p>