Results 1 to 20 of 20

Thread: vba selective copying and pasting on the same powerpoint slide

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #17
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    264
    Location

    vba Selective Copying and Pasting Shapes on the Same PowerPoint Slide

    Good day

    I have adapted the code by John Wilson and it is working perfectly, solving the first part of the problem

    The following code is in the slides code and a button is used to reset the global iCnt variable to 10:
     Private Sub CommandButton1_Click()
    iCnt = 10
    End Sub



    The following code is in a normal module:
     Option Explicit
    Global iCnt As Integer
    Sub copyme(oshp As Shape)
    Dim newshp As ShapeRange
    
    
    oshp.Copy
    Set newshp = oshp.Parent.Shapes.Paste
    newshp(1).Top = oshp.Top + 100
    newshp(1).Left = iCnt
    
    
    iCnt = iCnt + 110
    
    
    End Sub
    The second part is to copy whatever is in the second row a number of times to the third row, i.e. repeat the pattern created in the second line a number of times.

    Any further assistance is greatly appreciated.

    Best Regards
    Vanhunk
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •