Thread: Error on paste
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Error on paste

Hi Paul,

Am Wed, 27 Jul 2016 10:59:29 -0700 (PDT) schrieb Paul Doucette:

This code has worked in the past for copying an oval shape with a clear background from one sheet to another. (we use it to circle info we wish to draw attention to). But it recently began to error at Activesheet.Paste. Any thoughts on why that might be? Or a way to fix, or do differently? Thanks in advance, Paul


try:
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False

Sheets("Sheet2").Shapes("Oval 2").Copy

With Sheets("Sheet1")
.Unprotect
.Paste
With .Shapes("Oval 2")
.IncrementLeft -12.75
.IncrementTop -30.25
End With
.Protect DrawingObjects:=False, Contents:=True, Scenarios:=True
End With
Application.ScreenUpdating = True
End Sub


Regards
Claus B.
--
Windows10
Office 2016