ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   How To Open Chart Wizard Dialog on Excel 2003 (https://www.excelbanter.com/charts-charting-excel/188869-how-open-chart-wizard-dialog-excel-2003-a.html)

VeNoMiS

How To Open Chart Wizard Dialog on Excel 2003
 
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

ShaneDevenshire

How To Open Chart Wizard Dialog on Excel 2003
 
Hi,

I don't know a thing about C#, but why not exclude the Show arguments?

--
Cheers,
Shane Devenshire


"VeNoMiS" wrote:

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


Jon Peltier

How To Open Chart Wizard Dialog on Excel 2003
 
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).Execu te

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
_______


"VeNoMiS" wrote in message
...
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




VeNoMiS

How To Open Chart Wizard Dialog on Excel 2003
 


"Jon Peltier" wrote:

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).Execu te

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,f alse);

but doesn't work



Jon Peltier

How To Open Chart Wizard Dialog on Excel 2003
 
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
_______


"VeNoMiS" wrote in message
...


"Jon Peltier" wrote:

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).Execu te

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,f alse);

but doesn't work





VeNoMiS

How To Open Chart Wizard Dialog on Excel 2003
 
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" wrote:

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
_______


"VeNoMiS" wrote in message
...


"Jon Peltier" wrote:

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).Execu te

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,f alse);

but doesn't work






Jon Peltier

How To Open Chart Wizard Dialog on Excel 2003
 
Guess I showed my ignorance.

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


"VeNoMiS" wrote in message
...
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" wrote:

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
_______


"VeNoMiS" wrote in message
...


"Jon Peltier" wrote:

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).Execu te

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,f alse);

but doesn't work









All times are GMT +1. The time now is 10:24 PM.

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