Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #109123

Re: Error on paste

From GS <gs@v.invalid>
Newsgroups microsoft.public.excel.programming
Subject Re: Error on paste
Date 2016-07-27 17:31 -0400
Organization A noiseless patient Spider
Message-ID <nnb98i$seq$1@dont-email.me> (permalink)
References <c0b2c55a-367a-4483-bbfa-fe4174438c5c@googlegroups.com>

Show all headers | View raw


> 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
>
> Private Sub CommandButton2_Click()
> Application.ScreenUpdating = False
> Sheets("Sheet2").Select
> ActiveSheet.Shapes("Oval 2").Select
>     Selection.Copy
>     Sheets("Sheet1").Select
>     ActiveSheet.unprotect
>     ActiveSheet.Paste
>     Selection.ShapeRange.IncrementLeft -12.75
>     Selection.ShapeRange.IncrementTop -30.25
>     Sheets("Sheet1").Select
>     ActiveCell.Offset(0, 4).Range("A1").Select
>      Sheets("Sheet1").Select
>     ActiveSheet.protect DrawingObjects:=False, Contents:=True, 
> Scenarios:=True     Application.ScreenUpdating = True
> End Sub

Why not just draw a new shape when/as needed?

-- 
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
  comp.lang.basic.visual.misc
  microsoft.public.vb.general.discussion

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Back to microsoft.public.excel.programming | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Error on paste Paul Doucette <pauld@mewood.com> - 2016-07-27 10:59 -0700
  Re: Error on paste Claus Busch <claus_busch@t-online.de> - 2016-07-27 20:30 +0200
  Re: Error on paste Paul Doucette <pauld@mewood.com> - 2016-07-27 11:39 -0700
    Re: Error on paste Claus Busch <claus_busch@t-online.de> - 2016-07-27 20:57 +0200
  Re: Error on paste Paul Doucette <pauld@mewood.com> - 2016-07-27 12:24 -0700
  Re: Error on paste GS <gs@v.invalid> - 2016-07-27 17:31 -0400

csiph-web