+ Reply to Thread
Results 1 to 6 of 6

This macro closes firefox browser. I need a modification that closes Chrome

  1. #1
    Registered User
    Join Date
    12-14-2013
    Location
    edo,nigeria
    MS-Off Ver
    Excel 2007
    Posts
    85

    This macro closes firefox browser. I need a modification that closes Chrome

    Hello guys. I've got this code that works perfectly well with firefox . But upon changing the path to Chrome, it refuses to close the chrome browser after running the code . What modification can I make to the code below ( apart from changing the file path) to make it close the browser?
    Code:

    Please Login or Register  to view this content.
    Thanks

  2. #2
    Registered User
    Join Date
    12-14-2013
    Location
    edo,nigeria
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: This macro closes firefox browser. I need a modification that closes Chrome

    Anybody to help with the code?

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: This macro closes firefox browser. I need a modification that closes Chrome

    Just change this line to the correct path.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Registered User
    Join Date
    12-14-2013
    Location
    edo,nigeria
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: This macro closes firefox browser. I need a modification that closes Chrome

    @bakerman2 But upon changing the path to Chrome, it refuses to close the chrome browser after running the code . What modification can I make to the code below ( apart from changing the file path) to make it close the browser?
    Code:

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: This macro closes firefox browser. I need a modification that closes Chrome

    It works just fine as long as you only have 1 browsertab open. The moment you have the browser window open and then run the code it fails to close.

  6. #6
    Registered User
    Join Date
    12-14-2013
    Location
    edo,nigeria
    MS-Off Ver
    Excel 2007
    Posts
    85

    Re: This macro closes firefox browser. I need a modification that closes Chrome

    @Bakerman2 You are right about the multiple tab. It worked after I left only one tab open. But I've been trying to apply same rule to opera browser after changing the file path and ensuring that only one tab is open but the opera browser refuses to be closed. Could you figure what's wrong with it?
    Last edited by emymeeky; 03-27-2017 at 12:51 PM.

+ 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. [SOLVED] Code closes all but active workbook, also closes personal...
    By fourmurphys in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-24-2016, 03:43 PM
  2. Navigating a web browser (Firefox, IE or google chrome) through VBA
    By JimmySmith in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-08-2012, 05:35 AM
  3. Loading Macro when a workbook closes
    By Smurlos in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-27-2010, 03:22 PM
  4. Auto run macro when excel closes
    By ResulG in forum Excel General
    Replies: 3
    Last Post: 11-27-2006, 01:15 PM
  5. Excel closes down during a macro
    By Muttley in forum Excel General
    Replies: 0
    Last Post: 01-24-2006, 08:30 AM
  6. [SOLVED] run a macro before a workbook closes
    By Jonathan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-17-2005, 12:10 PM
  7. [SOLVED] Macro Editor closes Excel 2000 ?
    By Rmontgo in forum Excel General
    Replies: 0
    Last Post: 07-16-2005, 10: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