Microsoft KB Archive/113795

= Can't Select Label Attached to Filled Radar Series =

Article ID: 113795

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Excel 5.0c
 * Microsoft Excel 5.0a for Macintosh

-



This article was previously published under Q113795



SUMMARY
In Microsoft Excel 5.0, it may not be possible for a Visual Basic subroutine to select an individual data label attached to a filled radar series.



WORKAROUND
If your subroutine must select an individual data label attached to a filled radar series, you can use the Application.ExecuteExcel4Macro method to select the label.

Normally, if you want to select the fourth label in the second series, you would use the following Visual Basic code: ActiveChart.SeriesCollection(2).Points(4).DataLabel.Select However, if the label is attached to a filled radar series, you must use the following instead: Application.ExecuteExcel4Macro "SELECT(""Text S2P4"")" Note that the double quotation marks inside the parentheses are necessary because the method will remove a complete set when the command is executed.



MORE INFORMATION
In Microsoft Excel, there are two types of radar charts:    Type of Radar Chart   Description --

Wireframe            Lines connect the points but are not filled.

Filled               All lines connect the points and a fill pattern is                        applied such that a polygon is formed, with the series forming the perimeter of the polygon. In the Microsoft Excel ChartWizard, only the type 6 radar chart is a filled radar chart (all other types of radar chart are wireframes). You cannot mix a wireframe and a filled radar series in the same chart.

If you are recording a Visual Basic macro and you select an individual data label attached to a series (in this example, the fourth point of the second series), the recorded code looks like this: ActiveChart.SeriesCollection(2).Points(4).DataLabel.Select If you run this line of code when the second series is a filled radar series, you will receive the error message

Run-time error '1006':

Unable to get the DataLabel property of the Point class

The code will run correctly if the series is any other type of series, including a wireframe radar series.

To select an individual data label attached to a filled radar series, you must use the Application.ExecuteExcel4Macro method, shown above.

Visual Basic Code Example
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. This Visual Basic code example selects the label attached to the fifth point of the second series in a chart and moves the label to the coordinates 20,20. The series is a filled radar series, so the Application.ExecuteExcel4Macro is used to avoid the error described above. Sub MoveDataLabel

' Select the fifth point (P5) of the second series (S2). ' Normally, you would use: '      '   ActiveChart.SeriesCollection(2).Points(5).DataLabel.Select '      ' to do this, but this method does not work with a filled radar ' chart in Microsoft Excel 5.0. Application.ExecuteExcel4Macro "SELECT(""Text S2P5"")"

'Change the selection's (the label's) Left property. Selection.Left = 20

'Change the selection's (the label's) Top property. Selection.Top = 20 End Sub

Additional query words: 5.00a 5.00c XL5

Keywords: kbprogramming KB113795

-

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

© Microsoft Corporation. All rights reserved.