Microsoft Knowledge Base |
|
XL: Apply All Option in Chart No Longer Available |
|
|
Last reviewed: March 27, 1997
Article ID: Q121814 |
|
5.00 5.00c 7.00 | 5.00
WINDOWS | MACINTOSHkbcode kbmacro
The information in this article applies to:
SUMMARYIn Microsoft Excel version 4.0, you can apply formatting to all the series in a chart. This option is not available in Microsoft Excel versions 5.0 and 7.0.
MORE INFORMATIONIn Microsoft Excel versions 5.0 and 7.0, chart formatting is "selection based"; that is, the formatting will be applied only to the current selection. To have the ability to apply formatting to all of the series in a chart, you can use a Visual Basic procedure. The following sample Visual Basic procedure changes the pattern of all of the series in the active chart to a dotted one. Microsoft provides examples of Visual Basic 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. This Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.
Sub ApplyAll()Dim S As Series ' Turns screen updating off
Application.ScreenUpdating = False
' Loops through each series in the chart
For Each S In ActiveChart.SeriesCollection
' Changes the pattern of each series to a dotted pattern
S.Interior.Pattern = xlChecker
Next S
End Sub
To run the macro, activate a chart, and choose Macro from the Tools Menu.
Then select the ApplyAll macro from the list and select Run.
REFERENCESFor more information on Series Object Properties, such as Interior, choose the Search button in Visual Basic help, and type:
Series Object |
|
KBCategory: kbcode kbmacro
©1997 Microsoft Corporation. All rights reserved. Legal Notices. |