The information in this article applies to:
SYMPTOMS
In Microsoft Excel, you may receive the following error message when
you run a Visual Basic, Applications Edition, procedure that contains the
ChartWizard method:
CAUSE
This problem occurs if the Source argument that you use with the
ChartWizard method contains a number of nonadjacent range references.
Note that the number of the range references that will cause this
error message depends on the length of the name of the worksheet that
the chart is created on.
If you add another reference in the Range object for the Source argument,
you receive the error message described above when you run the procedure.
This problem occurs because Visual Basic converts the range string ("A1:C1,A2:C2,...") into a parsed reference. When you use the ChartWizard method with this reference, the ChartWizard method converts this reference to a string. When this occurs, the reference is converted to R1C1 format, and the sheet name is added to each individual reference. This causes the reference string to exceed the allotted buffer, and to be cut off. Because the reference is cut off, you receive the error message above when the ChartWizard method attempts to create the chart. Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support professionals can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400. RESOLUTION
To avoid receiving the error message above, use one of the following
methods.
The CHART.WIZARD() function works correctly with nonadjacent cell references because the range remains a string and does not need to be converted. The original string that you use as the Ref argument in the CHART.WIZARD function is the string that is parsed.Method 2: Copy and paste the cells in the range from which you are creating the chart so that they appear as one contiguous range. This range can then be referred to as one single range in the ChartWizard method. STATUSMicrosoft has confirmed this to be a problem in the Microsoft Excel versions listed above. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION
The ChartWizard method modifies the properties of the given chart and
allows a chart to be quickly formatted without setting all the
individual properties. This method is non-interactive and changes
only the specified properties.
REFERENCES
For more information about the ChartWizard Method, choose the Search
button in Help and type:
Additional query words: 5.00c
Keywords : kbcode |
Last Reviewed: August 11, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |