Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Bring Internet Explorer to Top

Bring Internet Explorer to Top

Bring Internet Explorer to Top

Hello. I am able to open Internet Explorer and Outlook with the following code on a button on my form;

CODE -->

Dim X As Variant
Dim Y As Variant

Dim Path1 As String
Dim Path2 As String
Path1 = "C:\Program Files\Internet Explorer\iexplore.exe"
Path2 = "C:\Program Files (x86)\Microsoft Office\OFFICE14\OUTLOOK.EXE"

X = Shell(Path1, vbNormalFocus)
Y = Shell(Path2, vbNormalFocus) 

When I navigate away from those windows back into Access, I would like to have a button to bring them both back to top. My code for this is;

CODE -->

WinToTop "Microsoft Internet Explorer"
WinToTop "Microsoft Outlook" 

Outlook comes to top but Internet Explorer does not. How would I get Internet Explorer to come to top also? Thanks very much in advance.

RE: Bring Internet Explorer to Top

I've only rarely tried to connect to other windows outside the Office applications via VBA. But I remember one way was to search through the active windows for what I'm looking for.

This seems like it could get there:

What I would try is looping through the windows, looking for a string that's part of the name, for instance, "Internet Explorer". Once it reaches that field, then trigger your other code.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close