Clear Method

Microsoft Graph Visual Basic

Show All

Clear Method

       

Clear method as it applies to the ChartArea and Legend objects.

Clears the entire chart area.

expression.Clear

expression   Required. An expression that returns one of the above objects.

 

Clear method as it applies to the Range object.

Clears the entire range.

expression.Clear

expression   Required. An expression that returns one of the above objects.

 

Example

This example clears the formulas and formatting in cells A1:G37 on the datasheet.

myChart.Application.DataSheet.Range("A1:G37").Clear

This example clears the chart area (the chart data and formatting) of Chart1.

myChart.ChartArea.Clear