title: Copy Rotate and Paste in Multiple Cells
body: <p>I am using an Excel VBA function to generate a barcode as image and paste it with rotation in two cells.</p>
  <p>Only the first paste is rotated and not the second one.</p>
  <pre class="lang-vb prettyprint-override"><code>Set xObjOLE = ActiveSheet.OLEObjects.Add(&quot;BARCODE.BarCodeCtrl.1&quot;)
  xObjOLE.Object.Style = 7
  xObjOLE.Object.Value = &quot;0123456789&quot;
  xObjOLE.Width = 120
  xObjOLE.Height = 30
  xObjOLE.CopyPicture xlScreen, xlPicture
  
  Set xRRg = Application.Range(&quot;H5&quot;)
  ActiveSheet.Paste xRRg
  With Selection
      .ShapeRange.Rotation = 270
  End With
  
  Set xRRg = Application.Range(&quot;S5&quot;)
  ActiveSheet.Paste xRRg
  With Selection
      .ShapeRange.Rotation = 270
  End With
  
  xObjOLE.Delete
  </code></pre>