+ Reply to Thread
Results 1 to 12 of 12

How to force close iexplore.exe ?

  1. #1
    Registered User
    Join Date
    09-06-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    16

    How to force close iexplore.exe ?

    Hello all,
    I always manual click [ESC] to stop at Running excel VBA for my macro test as IE.Navigate URL loop [visible=false] .

    so the screen box will be shown :

    Run-time error '91':
    Object variable or With block variable not set


    However, iexplore.exe hanging, will not closed, I need manual to close it on every time.
    Actually, IE.Quit is no problem. my Set IE = New InternetExplorer [ IE7 XP ]

    on the other hand, I try to use InternetExplorerMedium but not work defined what object.

    Anyone have an idea and method can force to close iexplore.exe ?
    Last edited by thiskeep; 09-23-2013 at 05:35 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How to force close iexplore.exe ?

    Why don't you allow the code to run to the end instead of stopping it?

    Can you post the code?
    If posting code please use code tags, see here.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: How to force close iexplore.exe ?

    Hello thiskeep,

    You can force IE to close using the SendMessage API. Internet Explorer made the window handle available in IE 7. This is needed because all system messages are sent to windows using their window handle.
    Place the API code at the top of a standard VBA module.

    Excel 2003 API Call
    Please Login or Register  to view this content.
    Windows 7 and later API Call
    Please Login or Register  to view this content.
    Closing Internet Explorer Example
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    09-06-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: How to force close iexplore.exe ?

    Quote Originally Posted by Norie View Post
    Why don't you allow the code to run to the end instead of stopping it?

    Can you post the code?
    Hi Norie
    Nice to meet you.
    I know that should be run to the end i/o stop,
    but I need to run loop processing to improve my command,
    coz IE cannot release memory [even I using eMoWeb Browser Optimizer ]
    and I need to get innerHTML data, variable formula, multiple step .....if then else ......... to excel sheet.
    example : collect some data from 1 to 30 webpages in each minute , each webpage data is variable,
    need define which formula suitable for put to use, and compare together.
    I already set table query collect data on worksheet , but very slow............Anyway, have an idea and method can force to close iexplore.exe ?

  5. #5
    Registered User
    Join Date
    09-06-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: How to force close iexplore.exe ?

    Hi Leith Ross

    Thanks for your response.

    Okay work , no need manual to close it.
    After click STOP, then click RUN again during iexplore.exe will be continue loading [ haven't hanging happen ]

    Excel 2003 API Call
    Please Login or Register  to view this content.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: How to force close iexplore.exe ?

    Hello thiskeep,

    Are you trying to stop Internet Explorer while it is still loading?

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: How to force close iexplore.exe ?

    Hello thiskeep,

    Are you trying to stop Internet Explorer while it is still loading?

  8. #8
    Registered User
    Join Date
    09-06-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: How to force close iexplore.exe ?

    Quote Originally Posted by Leith Ross View Post
    Hello thiskeep,

    Are you trying to stop Internet Explorer while it is still loading?
    click ESC stop , waiting 3~4 second, iexplore.exe have not closed shown in task, and memory stay 37,000KB +/- ,
    then click F5 RUN restart marco , the iexplore.exe continue load and memory increase. [ haven't hanging happen ]



    Please Login or Register  to view this content.

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How to force close iexplore.exe ?

    Just curious but why do you appear to have an infinite loop?

  10. #10
    Registered User
    Join Date
    09-06-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: How to force close iexplore.exe ?

    Quote Originally Posted by Norie View Post
    Just curious but why do you appear to have an infinite loop?
    the code is testing my ie memory.
    I need testing my ie memory, I don't like for/next.
    infinite loop purpose collect variable data refresh in each minutes
    and their URL address allocate updated at different times. so.........

  11. #11
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: How to force close iexplore.exe ?

    Hello thiskeep,

    I don't understand. What is the code doing?

  12. #12
    Registered User
    Join Date
    09-06-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: How to force close iexplore.exe ?

    Quote Originally Posted by Leith Ross View Post
    Hello thiskeep,

    I don't understand. What is the code doing?
    collect stock data to calculate, in each minute auto output different excel chart to compare.

+ 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. Disable close workbook but still force users to close thru command button
    By rathig in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2013, 07:29 AM
  2. Force a form to close in a new opened worksheet
    By Islwyn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-02-2012, 07:14 PM
  3. Force cell entry before move or close?
    By KausBorealis in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2008, 05:46 PM
  4. Replies: 4
    Last Post: 02-02-2006, 03:45 PM
  5. Force a Message Box to close unanswered
    By jennie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2005, 06:05 AM

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