Change Input Focus: bring Form to front:Stop Excel from flashing: HELP!


  • My Macro doesn't bring my userform to the front because it has just transfered focus to Internet Explorer. Instead the Taskbar flashes repeatedly. the code is simple:


    Set MyObject = CreateObject("internetexplorer.application")
    With MyObject

         .Visible = False
         .Navigate MyLocation

         Do While .ReadyState <> 4: Loop
    End With


    Load UserForm1



    What code do i write to bring Excel back to the focus and present the userform "on top"?




    Tuesday, September 11, 2007 11:24 AM

All replies

Thursday, September 13, 2007 3:52 AM
  • IRONIC!!!!

    I have exactly the opposite problem.  I can't get the IE window to stay on top.

    However, after trying it your way, IT WORKED!!

    Here is your answer..

    UserForm1.Show vbModeless

    Leave out the Load UserForm1 part.

    I think you can also just leave the vbModeless out and put 1.  vbModeless just allows you to click outside the userform, or run other macros while it is showing.

    I hope that MSDN will allow my post, as it would be greatly appreciated since such a problem is hard to find a solution to, I've been looking for a while.


    Friday, September 28, 2007 7:11 PM