How To Open Chart Wizard Dialog on Excel 2003

V

VeNoMiS

Hi All,
I need to open the Chart Wizard Dialog by c# code

my code is the follow

excel.Dialogs[mode].Show(missing x30);

where
excel = new Excel.Application
mode = xlDialogChartWizard
missing = System.Type.Missing;
show has 30 args so i repeat missing 30 times


this code works for the xlDialogPivotTableWizard dialog

Help me pls

Thx in Advance
 
J

Jon Peltier

Not all dialogs work in this way. If you need to show the chart wizard, you
could use this instead (this is the VBA, it's up to you to find the C#
equivalent):

Application.CommandBars.FindControl(Id:=436).Execute

This finds the Insert Chart control and executes it, which pops up the chart
wizard.

- Jon
 
V

VeNoMiS

Jon Peltier said:
Not all dialogs work in this way. If you need to show the chart wizard, you
could use this instead (this is the VBA, it's up to you to find the C#
equivalent):

Application.CommandBars.FindControl(Id:=436).Execute

This finds the Insert Chart control and executes it, which pops up the chart
wizard.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______

I've tried this code

object id = 436
excel.CommandBars.FindControl(missing,id,missing,false);

but doesn't work
 
V

VeNoMiS

Based on msdn

CommandBarControl FindControl(
[In, Optional] object Type,
[In, Optional] object Id,
[In, Optional] object Tag,
[In, Optional] object Visible,
[In, Optional] object Recursive
);
 
J

Jon Peltier

Guess I showed my ignorance.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


VeNoMiS said:
Based on msdn

CommandBarControl FindControl(
[In, Optional] object Type,
[In, Optional] object Id,
[In, Optional] object Tag,
[In, Optional] object Visible,
[In, Optional] object Recursive
);

Jon Peltier said:
At the risk of showing my ignorance, wouldn't the control ID be a long?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______
 

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