Results 1 to 9 of 9

opening seperate excel instances macro

Threaded View

  1. #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).

    Private Sub CommandButton1_Click()
      'Adapted from Andy Pope circa 2003 - Thank you again, Andy.
      'http://www.ozgrid.com/forum/showthread.php?t=16893
      '
      'It it the calling routine's responsibility to make sure that:
      'a. The Excel file to be opened exists
      'b. The Excel file is not already open
      
        Dim xlApp As Application
        Dim xlBook As Workbook
        
        Dim sPathAndFileName As String
        
        'Create the Path and File Name for the Workbook
        sPathAndFileName = ("C:\Users\RAM\Desktop\TEST\CHARTB.xlsm")
        
        'Open a new Instance of Excel and make it visible
        Set xlApp = New Excel.Application
        xlApp.Visible = True
        
        'Open the File in the new instance of Excel
        Set xlBook = xlApp.Workbooks.Open(sPathAndFileName)
        
        'Clear the objects
        Set xlApp = Nothing
        Set xlBook = Nothing
    End Sub
    Thanks
    Keith
    Last edited by Quicksnot; 06-26-2014 at 05:37 PM.

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. 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