Need Help Please

  • Thread starter Thread starter sbriscoe
  • Start date Start date
S

sbriscoe

Hi Everyone
I am having a problem getting my CommandBar code working when there i
already an Excel Application running.

When I run my program and there are no other Excel processes running
my Tool Bar changes display properly (I am hiding the Save and Ne
buttons on the toolbar).

But - when I already have an Excel application up, then when I run th
application - it looks like it is using the Tool Bar from the existin
Excel and my Save and New buttons reappear

Is there anyway to fix this?

Thanks so much in advance.
Staci
 
Don't think so. Why don't you re-use the same Excel instance, and raise your
toolbar when your workbook opens and reset afterwards?
 
Can you give an example of what you mean by using the same instance?
am writing in C#.

Wouldnt that affect the toolbar of both Excel's then? (which I don
want to do - I only want the excel in my application to have th
toolbar changes)
 
In C# I have no idea I am afraid, but it VBA you would use GetObject to see
if app is already there, otherwise CreateObject it.

--
HTH

-------

Bob Phillips
Bob Phillips said:
Don't think so. Why don't you re-use the same Excel instance, and raise your
toolbar when your workbook opens and reset afterwards?
 
Thanks for your help :)

Right now I am using:

ExcelApp = new Excel.Application();

Which is creating a new object.

I will have to see about a GetObject() call in C#...

anyone out there have any idea?
 

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

Back
Top