+ Reply to Thread
Results 1 to 10 of 10

How to activate an excel file opened in seperate excel instance

  1. #1
    Registered User
    Join Date
    12-30-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    20

    How to activate an excel file opened in seperate excel instance

    code shown below can open a excel file in seprate excel instance. But is it possible to to check whether this file is already opened and if so just show the opened file to the user?

    code
    Please Login or Register  to view this content.
    /code
    Last edited by vlady; 01-07-2014 at 03:13 AM.

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: How to activate an excel file opened in seperate excel instance

    Hi, BB code tags must be wrapped in brackets like this -> [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]

    Try this

    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  3. #3
    Registered User
    Join Date
    12-30-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: How to activate an excel file opened in seperate excel instance

    Hi Millz,

    Thanks for your reply. But it didnt work, new copy of Non-Conformity Tracking file is opened every time i click the 'ButtonMaster' button.

    Regards,
    Mekha

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: How to activate an excel file opened in seperate excel instance

    It works when I tested. Didn't work for you probably because you already have 2 Excel applications running. Try closing all instances of Excel and run again.

    If you are running this code in Excel itself, you don't need to use Excel.Application.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-30-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: How to activate an excel file opened in seperate excel instance

    Hi Millz,

    Thanks for your reply.
    the latest code that you provided can identitfy whether "Non-Conformity Tracking" file is already open but this time if it not open it will open the file in same excel instance. But my objective is to open it in different excel instance since the macro used to open "Non-Conformity Tracking" will still be running in another excel and i can continue run that to complete my tasks. By doing this user can work with both the file simultaneously.

    Any suggestions?

    Regards,
    mekha

  6. #6
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: How to activate an excel file opened in seperate excel instance

    If you must really run it in a separate instance of Excel, then I guess I am unable to help further. I am unsure of how to "grab" the other instance and reference it.

    Maybe someone else can help you.

  7. #7
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: How to activate an excel file opened in seperate excel instance

    See if you can use this...

  8. #8
    Registered User
    Join Date
    12-30-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: How to activate an excel file opened in seperate excel instance

    It looks complicated. I am very new to VBA. Anyway let me check whether i can understand this.

  9. #9
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: How to activate an excel file opened in seperate excel instance

    Sometimes complication is necessary.

    The code has been revised slightly and a test procedure added (Sub Test, naturally). Copy all the following into a new module.

    Start a new instance of Excel and load your Non-Conformity Tracker workbook in that instance. Change the search strings in Sub Test to match and step through it using F8

    Please Login or Register  to view this content.
    Just in case, a simple example... run after loading the non conformity tracker in another instance
    Please Login or Register  to view this content.
    Last edited by cytop; 01-07-2014 at 06:08 AM.

  10. #10
    Registered User
    Join Date
    12-30-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: How to activate an excel file opened in seperate excel instance

    It worked.. Thanks you so much.

+ 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. How to activate a SEPARATE instance of excel???
    By mhouston in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 08-14-2013, 04:38 PM
  2. seperate instance of the Excel application
    By bta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2012, 08:41 PM
  3. Excel ADO connection opens read-only instance of opened Excel
    By Snoopy2003 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2012, 05:36 PM
  4. How To Activate Workbook In Separate Instance Of Excel
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 05-10-2009, 07:22 PM
  5. [SOLVED] Set up Excel to start new instance for each new file opened.
    By Minimal_Subset in forum Excel General
    Replies: 2
    Last Post: 05-11-2005, 09:06 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