+ Reply to Thread
Results 1 to 4 of 4

Paste vs PasteSpecial

  1. #1
    Gary''s Student
    Guest

    Paste vs PasteSpecial

    I can copy/paste with one line of code:

    Sub ccz1()
    Cells(1, 1).Copy Cells(2, 2)
    End Sub

    but when I want to copy/pastespecial I use two:

    Sub ccz2()
    Cells(1, 1).Copy
    Cells(2, 2).PasteSpecial Paste:=xlPasteValues
    End Sub

    Is there a syntax which performs copy/pastespecial with only one line?
    --
    Gary's Student

  2. #2
    Jim Thomlinson
    Guest

    RE: Paste vs PasteSpecial

    I agree that it is weird, but you are correct. One line for a simple paste
    and two lines for a pastespecial.
    --
    HTH...

    Jim Thomlinson


    "Gary''s Student" wrote:

    > I can copy/paste with one line of code:
    >
    > Sub ccz1()
    > Cells(1, 1).Copy Cells(2, 2)
    > End Sub
    >
    > but when I want to copy/pastespecial I use two:
    >
    > Sub ccz2()
    > Cells(1, 1).Copy
    > Cells(2, 2).PasteSpecial Paste:=xlPasteValues
    > End Sub
    >
    > Is there a syntax which performs copy/pastespecial with only one line?
    > --
    > Gary's Student


  3. #3
    Gary''s Student
    Guest

    RE: Paste vs PasteSpecial

    Thanks for your time with such a simple question.
    --
    Gary''s Student


    "Jim Thomlinson" wrote:

    > I agree that it is weird, but you are correct. One line for a simple paste
    > and two lines for a pastespecial.
    > --
    > HTH...
    >
    > Jim Thomlinson
    >
    >
    > "Gary''s Student" wrote:
    >
    > > I can copy/paste with one line of code:
    > >
    > > Sub ccz1()
    > > Cells(1, 1).Copy Cells(2, 2)
    > > End Sub
    > >
    > > but when I want to copy/pastespecial I use two:
    > >
    > > Sub ccz2()
    > > Cells(1, 1).Copy
    > > Cells(2, 2).PasteSpecial Paste:=xlPasteValues
    > > End Sub
    > >
    > > Is there a syntax which performs copy/pastespecial with only one line?
    > > --
    > > Gary's Student


  4. #4
    Dave Peterson
    Guest

    Re: Paste vs PasteSpecial

    If you're pasting values, maybe you could just assign the value.

    cells(2,2).value = cells(1,1).value



    Gary''s Student wrote:
    >
    > I can copy/paste with one line of code:
    >
    > Sub ccz1()
    > Cells(1, 1).Copy Cells(2, 2)
    > End Sub
    >
    > but when I want to copy/pastespecial I use two:
    >
    > Sub ccz2()
    > Cells(1, 1).Copy
    > Cells(2, 2).PasteSpecial Paste:=xlPasteValues
    > End Sub
    >
    > Is there a syntax which performs copy/pastespecial with only one line?
    > --
    > Gary's Student


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1