Microsoft KB Archive/291208

= Error message when you use the &quot;Application.Dialogs(xlDialogChartWizard).Show&quot; code to display the Chart Wizard dialog box in Excel: &quot;Run-time error '1004': Show method of Dialog class failed&quot; =

Article ID: 291208

Article Last Modified on 1/31/2007

-

APPLIES TO


 * Microsoft Office Excel 2007
 * Microsoft Office Excel 2003
 * Microsoft Excel 2002 Standard Edition

-



This article was previously published under Q291208





For a Microsoft Excel 2000 version of this article, see 231106.



SYMPTOMS
You run a Microsoft Visual Basic for Applications (VBA) macro in Microsoft Excel that uses the following code to display the Chart Wizard dialog box. Application.Dialogs(xlDialogChartWizard).Show When you do this, the procedure is unsuccessful. Additionally, you receive the following error message:

Run-time error '1004':

Show method of Dialog class failed



CAUSE
This problem occurs if the chart on which the code is used is a PivotChart rather than a traditional chart.



WORKAROUND
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. To work around this problem, use the VBA equivalent of the XLM macro command when the chart may be a PivotChart. This command is as follows. Application.ExecuteExcel4Macro &quot;CHART.WIZARD?(TRUE)&quot;



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Additional query words: XL2002 XL2003 XL2007

Keywords: kbbug kbdtacode kberrmsg kbpending KB291208

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.