ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Start my Application in its OWN instance? (https://www.excelbanter.com/excel-programming/420417-start-my-application-its-own-instance.html)

Webtechie

Start my Application in its OWN instance?
 
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

Barb Reinhardt

Start my Application in its OWN instance?
 
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.
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Webtechie" wrote:

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


Webtechie

Start my Application in its OWN instance?
 
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






"Barb Reinhardt" wrote:

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.
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Webtechie" wrote:

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



All times are GMT +1. The time now is 07:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com