Start my Application in its OWN instance?

W

Webtechie

Hello,

I've created an Excel application using userforms that is actually pretty
good. I hide the Excel application and using the userforms, you can't really
tell you are in Excel. Ok. Great.

However, if the user has Excel open already, the Excel Application that I
wrote snags and hides everything.

How do you code a workbook in VBA so that when it opens, it opens in its own
instance?

If I then to use application.visible = false, will that just hide the Excel
instance of my application's workbook?

I hope I am conveying what I am trying to do well enough?

I only want to hide the latest instance (my app's instance), not totally
take over the user's Excel experience.

Is this possible?

Thanks,

Tony
 
B

Barb Reinhardt

You can create a new instance of Excel within your code doing something like
this

Dim XLApp as Excel.Application

Set XLApp = CreateObject("Excel.Application")

The only problem with this is that your original workbook is contained in
the application instance in which you opened it.

I've found that each time I open Excel from the Start menu (Start -Programs
) or (Start to quick start menu), I get a new instance. I'm not sure if
that's global, or if it was set up that way.
 
W

Webtechie

Barb,

I guess I can create an addin that will open a workbook in a new instance
and then hide that instance.

Would I still be able to use functions from my addin with my workbook, if
there are using separate instances?

Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top