ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   a little help? OLE object, which version of app? (https://www.excelbanter.com/excel-programming/285467-little-help-ole-object-version-app.html)

Drew Hershkowitz

a little help? OLE object, which version of app?
 
I have a VB app that places an excel sheet on a form. It creates an
instance of excel automatically, which is fine. When I click into the
grid to edit, I get all the menus, etc., so I am forced to turn off
all the menus and commandbars so the user will not do anything but
edit the data.

Here's the issue: If the user already had excel open, the instance
that is grabbed for the OLE work is THAT instance, turning off the
menus for the user, etc. How can I force it to use a NEW instance of
excel? Ive tried the early vs. late binding, no luck. I cannot point
the OLE object at a particular instance of excel.

Any help would be appreciated!

Thanks,
DH

Jon Peltier[_4_]

a little help? OLE object, which version of app?
 
Drew -

When I included these lines in a macro in PowerPoint, it opened a new
Excel instance, leaving alone the instance already open.

Dim xlApp As Excel.Application
Set xlApp = CreateObject("Excel.Application")

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Drew Hershkowitz wrote:

I have a VB app that places an excel sheet on a form. It creates an
instance of excel automatically, which is fine. When I click into the
grid to edit, I get all the menus, etc., so I am forced to turn off
all the menus and commandbars so the user will not do anything but
edit the data.

Here's the issue: If the user already had excel open, the instance
that is grabbed for the OLE work is THAT instance, turning off the
menus for the user, etc. How can I force it to use a NEW instance of
excel? Ive tried the early vs. late binding, no luck. I cannot point
the OLE object at a particular instance of excel.

Any help would be appreciated!

Thanks,
DH




All times are GMT +1. The time now is 12:20 AM.

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