+ Reply to Thread
Results 1 to 8 of 8

Problem manipulating IE window (opens minimized)

  1. #1
    Registered User
    Join Date
    06-19-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    97

    Problem manipulating IE window (opens minimized)

    Hey guys!

    I have a macro that opens an IE window and then does some stuff with it via SendKeys commands.

    Usually it works fine - the IE window pops up on top of Excel and is the active object, and then the macro does everything it needs to.

    Sometimes the IE window opens minimized though, and then the Sendkeys commands start manipulating the Excel sheet and messes it all up.

    Is there a way for the macro to check if the IE window is on top, and make it if it isn't, before executing the Sendkeys commands?

    Thanks!

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Problem manipulating IE window (opens minimized)

    I recently had the same problem and found the answer here > http://www.mrexcel.com/forum/excel-q...rer-excel.html

  3. #3
    Registered User
    Join Date
    03-12-2014
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Problem manipulating IE window (opens minimized)

    mattmc419, to ensure that IE always opens up on a full screen mode. Paste the below on your module code for IE

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Problem manipulating IE window (opens minimized)

    Quote Originally Posted by jayesh25 View Post
    mattmc419, to ensure that IE always opens up on a full screen mode. Paste the below on your module code for IE

    Please Login or Register  to view this content.
    setting it to fullscreen however then causes the menus etc to be hidden.

  5. #5
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Problem manipulating IE window (opens minimized)

    use AppActivate Command before SendKeys

  6. #6
    Registered User
    Join Date
    03-12-2014
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Problem manipulating IE window (opens minimized)

    Hmm it's a better idea to actually use direct commands to send to a HTML doc referring to it's ID? I could probably share a more reliable solution to you if you tell us what you're trying to achieve by sharing the website link and what details you need to paste under which category that you're currently doing with SendKey?

  7. #7
    Registered User
    Join Date
    06-19-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    97

    Re: Problem manipulating IE window (opens minimized)

    Yeah usually I use the ID, but I'm trying to do some automating of uploads on Amazon and 1) for some reason setting a dropdown list via the ID doesn't create the "Browse" button to choose a file to upload,and 2) that "Browse" button doesn't let me inspect element to find its ID to click.

    So I've just been using SendKeys to tab to the two fields lol

  8. #8
    Registered User
    Join Date
    03-12-2014
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Problem manipulating IE window (opens minimized)

    ahh fair enough. In that case you could use what hafiz suggested Here's the sample code

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Full screen after window is minimized
    By lsteinbach in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2013, 06:01 PM
  2. Replies: 1
    Last Post: 09-08-2009, 04:56 PM
  3. Opens bhind other windows or minimized
    By Jmmac04 in forum Excel General
    Replies: 0
    Last Post: 04-17-2006, 12:40 PM
  4. [SOLVED] Help window opens minimized
    By Dick L in forum Excel General
    Replies: 0
    Last Post: 09-21-2005, 08:05 PM
  5. [SOLVED] File opens in minimized view
    By ted in forum Excel General
    Replies: 0
    Last Post: 07-23-2005, 11:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1