Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ClearContents Method [Excel 2003 VBA Language Reference]

Office 2003

Clears the formulas from the range. Clears the data from a chart but leaves the formatting.

expression .ClearContents

expression Required. An expression that returns a ChartArea or Range object.

Example

This example clears the formulas from cells A1:G37 on Sheet1 but leaves the formatting intact.

Worksheets("Sheet1").Range("A1:G37").ClearContents
		

This example clears the chart data from Chart1 but leaves the formatting intact.

Charts("Chart1").ChartArea.ClearContents
		




Show: