+ Reply to Thread
Results 1 to 3 of 3

Switching between workbooks open in different instances

  1. #1
    Registered User
    Join Date
    03-02-2012
    Location
    Toulouse
    MS-Off Ver
    Excel 2007
    Posts
    24

    Switching between workbooks open in different instances

    Hello everyone,

    I have to work with two workbooks and paste some information of #1 into #2. They are both open in different excel instances and the macro I am trying to code is stored in the PERSONAL file, so it is available everywhere.

    I am trying to use the Application.Workbooks(x).Activate method, in which "x" is the number of each open workbook according to the order in which they were opened.

    Let's say that I run the above-mentioned command in a macro, launching the macro from file #1. The x becomes 1 for the PERSONAL file and 2 for the #1 file itself. If I put x=3, the macro gives me an error, as file #2 is in a different Excel instance and does not get recognised.

    It there any way to select file #2 launching a macro stored in PERSONAL from file #1?

    Thanks in advance for your help!

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

    Re: Switching between workbooks open in different instances

    Have a read of http://www.ozgrid.com/forum/showthread.php?t=182853

    There's 2 examples in the thread, the second can be used to return a reference to a workbook or worksheet in another instance of Excel - you can then use that reference in code...

    Please Login or Register  to view this content.

    You may be able to apply it your your particular requirements...

  3. #3
    Registered User
    Join Date
    03-02-2012
    Location
    Toulouse
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Switching between workbooks open in different instances

    Looks like a lot of info, I'll study this and let you know the results. Thanks for the help!

+ 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] Vlookup between two open workbooks in two seperate instances of Excel
    By dave84x in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-14-2014, 02:18 PM
  2. [SOLVED] Switching Between Open Workbooks In VBA
    By ajocius in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-16-2012, 05:14 AM
  3. Switching between open workbooks
    By Sam_Gregson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2009, 05:58 AM
  4. Switching Between Open Workbooks in Excel 2007
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 10-31-2007, 04:35 AM
  5. [SOLVED] Re - Excel Loading Multiple Instances to Trigger Events amidst Switching-from-One-to-Another
    By tkt_tang@hotmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-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