View Full Version : Everytime I open my excel file open this file as new excel instance
petroj02
01-27-2017, 05:13 AM
Hello everyone,
I am wondering if there is some way, how to always open the specific excel file which I am using as new excel instance no matter there is some other excel file opened. I have tried few ways and I am not bale to reach the goal
Option Explicit
Sub test()
Dim xl As Application
Dim wb As Workbook
Set xl = CreateObject("excel.application")
xl.Visible = True
Set wb = xl.Workbooks.Open("c:/******/test.xlsx")
End Sub
Paul_Hossler
01-27-2017, 07:19 AM
Hello everyone,
I am wondering if there is some way, how to always open the specific excel file which I am using as new excel instance no matter there is some other excel file opened. I have tried few ways and I am not bale to reach the goal
Why do you want 2 instances?
I've always tried to avoid that since it can get confusing (to me at least)
petroj02
01-29-2017, 10:47 PM
to Paul
I have one excel file, this file serve as something like configurator of LED lighting. There is one main userform. This main userform I need to open after opening excel file and this excel apllication should be hidden for user and on screen should be only main userform. Since I have the same instance and i to do this action and since I have some other excel file opened it gives me error msg that activeX couldnt crate the object before showing my main userform. I have found that solution with new instance of excel is solution for me right now, but I am not saying this is the best one solution
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.