Skip to main content

Chart.Paste method

Table of contents
  1. Syntax
  2. Parameters
  3. Example

Pastes chart data from the Clipboard into the specified chart.

Syntax

expression.Paste (Type)

expression A variable that represents a Chart object.

Parameters

 

Name Required/Optional Data type Description
Type Optional Variant Specifies the chart information to paste if a chart is on the Clipboard. Can be one of the following XlPasteType constants: xlPasteFormatsxlPasteFormulas, or xlPasteAll. The default value is xlPasteAll. If there's data other than a chart on the Clipboard, this argument cannot be used.

Example

This example pastes data from the range B1:B5 on Sheet1 into Chart1.

Worksheets("Sheet1").Range("B1:B5").Copy Charts("Chart1").Paste

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>