Open In New Instance of Excel

MikeDBMan

Well-known Member
Joined
Nov 10, 2010
Messages
610
Is there a way with VBA to force Excel to open a file in a different instance of Excel?

What about in a new instance of Excel? Thanks for any help!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hallo

I hope you understand the request

Code:
Sub New_Instance_of_Excel()
    Dim objXL
    Set objXL = CreateObject("Excel.Application")
    objXL.Visible = True
    objXL.Workbooks.Add
End Sub
 
Upvote 0
I see how that works just fine. Now, after I have two instances running, how can I tell Excel to open a file in the other instance. This would happen later after the sub you created has completed. Here is the scenario:
1. I create a second instance of Excel. That Sub ends.
2. Later I wish to open a file in that other instance of Excel.
3. Then I close that file.
4. Then later again I repeat step 2 and 3.

Is this feasible or is it easier/better to just close that 2nd instance of excel and reopen it each time? Thanks.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top