+ Reply to Thread
Results 1 to 9 of 9

opening seperate excel instances macro

  1. #1
    Forum Contributor
    Join Date
    05-24-2012
    Location
    Racine, wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    225

    opening seperate excel instances macro

    Hi

    I have 2 monitors and would like to open 2 separate excel instances, so I can display the two on separate monitors
    right now the code just opens the workbook and can't separate them.

    any help would be appreciated

    Thank
    Keith

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: opening seperate excel instances macro

    Hi Q,

    See post #7 in the following thread: http://www.excelforum.com/excel-prog...el-window.html

    Lewis

  3. #3
    Forum Contributor
    Join Date
    05-24-2012
    Location
    Racine, wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    225

    Re: opening seperate excel instances macro

    HI LJMetzger

    well I went to the link, I'm a newbie at this, but I tried figuring out how to make that code work
    with no luck, the path to my file I would like to open is "C:\Users\RAM\Desktop\TEST\CHARTB.xlsm.

    below is the code I tried to use, could you possibly put the path in the right spots for me .

    Please Login or Register  to view this content.
    THANKS
    Keith

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: opening seperate excel instances macro

    Hi Keith,

    You were very close. This worked fine for me with my file and path replacing yours. The only change I made was to delete the following line:
    Please Login or Register  to view this content.

    Try this:
    Please Login or Register  to view this content.
    Please let me know if you have any more problems.

    Lewis

  5. #5
    Forum Contributor
    Join Date
    05-24-2012
    Location
    Racine, wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    225

    Re: opening seperate excel instances macro

    Hi LJMetzger

    OK I have to apologize for the below statement. I took the folder to my other computer
    and put it on the desktop and changed the file path, and it worked perfect, thanks you so much.

    the problem is I changed some registry on this computer for DDE and it no longer works on this
    computer, so I will have to probably wipe excel and reload it on this one.

    below is the problem with this comp now, not with the code. i'll leave the answer this way
    incase someone has the same problem using this code.

    and i'll mark this as solved.

    Thanks Again LJMetzger

    all hail LJMetzger hehe.

    I get an error when I paste this into my command button, I'm using the active x control button on my sheet.
    could that be the problem?.

    below I get the dreaded yellow on this line ( Set xlApp = New Excel.Application).

    Please Login or Register  to view this content.
    Thanks
    Keith
    Last edited by Quicksnot; 06-26-2014 at 05:37 PM.

  6. #6
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: opening seperate excel instances macro

    Hi Keith,

    You didn't do anything wrong.

    The following line uses what is known as 'Early Binding' which requires a library reference. 'Late Binding' is a story for another day.
    Please Login or Register  to view this content.
    In the VBA editor you have to enable the Excel Object Library
    Please Login or Register  to view this content.
    Lewis

  7. #7
    Forum Contributor
    Join Date
    05-24-2012
    Location
    Racine, wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    225

    Re: opening seperate excel instances macro

    Hi LJMetzger

    Thanks for your help and I was so happy with the code, it works great, but just not on this computer.

    I went to, Tools > References > Microsoft Excel xx.0 Object Library and xx=14, and it was already checked, so I did an office repair
    and it still doesn't work on this comp. something way over my head, but the code works great.

    i marked it solved because that issue is solved , thanks to you, but have more excel work to complete this very big task i have been given.
    i will tell you the next part if your interested, or i can start a new thread, the next part will be using the same code with a copy and paste function
    i need it to copy C4 to C35 before it opens the new workbook and then paste it into A3 to A34 in the new workbook.

    Thanks
    Keith

  8. #8
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: opening seperate excel instances macro

    The following macro uses 'Late Binding' and may work on your computer. See the following for differences between 'early' and 'late' binding:
    http://msdn.microsoft.com/en-us/library/0tcf61s1.aspx
    http://word.mvps.org/faqs/interdev/e...atebinding.htm

    Changes in Red:
    Please Login or Register  to view this content.

    i need it to copy C4 to C35 before it opens the new workbook and then paste it into A3 to A34 in the new workbook.
    That is difficult to do when you have separate instances of Excel, because in separate instances the data is completely segregated.

    It can be accomplished in either of 2 ways that I can think of:
    1. Original file pushes data into second file.
    a. Open Second file in same instance of Excel
    b. Copy data to second file
    c. Close second file (AND PERMANENTLY SAVE THE NEW DATA).
    d. Open the second file in a new instance of Excel

    2. New file pulls data from a temporary Excel file.
    a. The original file stores the data in a 3rd Excel file (and closes the 3rd file).
    b. Open the second file in a new instance of Excel
    c. An AutoStart (Workbook_Open) macro starts in the new instance of Excel.
    d. If the 3rd file exists, the second file will copy the data to the second file from the 3rd file.
    e. The second file either DELETES the 3rd file or writes in a special cell in the 3rd file to indicate that the data was imported (to prevent the second file from importing OLD data).

    Lewis

  9. #9
    Forum Contributor
    Join Date
    05-24-2012
    Location
    Racine, wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    225

    Re: opening seperate excel instances macro

    Hi LJMetzger

    the new code does work on this computer

    Thank you so very much

    i'll keep working on the copy and paste thing.

    it won't let me give you rep right now, but i'll make it up to you after I give someone else rep, hopefully for the copy and paste thing

    Thanks

    Keith

+ 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 across two instances of Excel (2 seperate workbooks)
    By Metrazal in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-27-2014, 06:39 PM
  2. [SOLVED] Opening Seperate Excel Instances with Windows 7
    By tdsmith14 in forum Excel General
    Replies: 8
    Last Post: 05-30-2013, 09:59 AM
  3. How To Close 2 Workbooks In Seperate Instances of Excel
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2009, 11:47 PM
  4. How can I activate an open workbook by macro in seperate instances of Excel
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-15-2009, 12:05 AM
  5. [SOLVED] opening multiple instances of excel
    By John B in forum Excel General
    Replies: 4
    Last Post: 01-28-2005, 08: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