+ Reply to Thread
Results 1 to 8 of 8

Got the Copy/Cut Code But what is the Paste Code

  1. #1
    Corey
    Guest

    Got the Copy/Cut Code But what is the Paste Code

    If this code will copy a Cell value:

    [R59].Select
    ActiveCell.Copy

    and this is a Cut code :

    [R59].Select
    ActiveCell.Cut

    What is a Paste Code ?
    This don't work :

    [R59].Select
    ActiveCell.Paste



    What is the code equivalent to paste ?

    Corey....

  2. #2
    WhytheQ
    Guest

    Re: Got the Copy/Cut Code But what is the Paste Code

    (square brackets are slow)

    I quite like this format to copy from A1 to A2:
    Range("A1").Copy Range("A2")

    Regards
    Jason



    Corey wrote:
    > If this code will copy a Cell value:
    >
    > [R59].Select
    > ActiveCell.Copy
    >
    > and this is a Cut code :
    >
    > [R59].Select
    > ActiveCell.Cut
    >
    > What is a Paste Code ?
    > This don't work :
    >
    > [R59].Select
    > ActiveCell.Paste
    >
    >
    >
    > What is the code equivalent to paste ?
    >
    > Corey....
    > ------=_NextPart_000_01B2_01C6A203.D81BA5D0
    > Content-Type: text/html; charset=windows-1250
    > Content-Transfer-Encoding: quoted-printable
    > X-Google-AttachSize: 1819
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    > <HTML><HEAD>
    > <META http-equiv=Content-Type content="text/html; charset=windows-1250">
    > <META content="MSHTML 6.00.2900.2912" name=GENERATOR>
    > <STYLE></STYLE>
    > </HEAD>
    > <BODY bgColor=#ffffff>
    > <DIV><EM><FONT face="Comic Sans MS">If this code will copy a Cell
    > value:</FONT></EM></DIV>
    > <DIV><EM><FONT face="Comic Sans MS"></FONT></EM>&nbsp;</DIV>
    > <DIV><EM><FONT
    > face="Comic Sans MS">[R59].Select<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    > ActiveCell.Copy</FONT></EM></DIV>
    > <DIV><EM><FONT face="Comic Sans MS"></FONT></EM>&nbsp;</DIV>
    > <DIV><EM><FONT face="Comic Sans MS">and this is a Cut code :</FONT></EM></DIV>
    > <DIV><EM><FONT face="Comic Sans MS"></FONT></EM>&nbsp;</DIV>
    > <DIV><EM><FONT face="Comic Sans MS">[R59].Select</FONT></EM></DIV>
    > <DIV><EM><FONT face="Comic Sans MS">ActiveCell.Cut</FONT></EM></DIV>
    > <DIV><EM><FONT face="Comic Sans MS"></FONT></EM><EM><FONT
    > face="Comic Sans MS"></FONT></EM>&nbsp;</DIV>
    > <DIV><EM><FONT face="Comic Sans MS">What is a Paste Code ?</FONT></EM></DIV>
    > <DIV><EM><FONT face="Comic Sans MS">This don't work :</FONT></EM></DIV>
    > <DIV><EM><FONT face="Comic Sans MS"></FONT></EM>&nbsp;</DIV>
    > <DIV><EM><FONT face="Comic Sans MS">[R59].Select</FONT></EM></DIV>
    > <DIV><EM><FONT face="Comic Sans MS">ActiveCell.Paste</FONT></EM></DIV>
    > <DIV><EM><FONT face="Comic Sans MS"></FONT></EM>&nbsp;</DIV>
    > <DIV><EM><FONT face="Comic Sans MS"></FONT></EM>&nbsp;</DIV>
    > <DIV><EM><FONT face="Comic Sans MS"></FONT></EM>&nbsp;</DIV>
    > <DIV><EM><FONT face="Comic Sans MS">What is the code equivalent to paste
    > ?</FONT></EM></DIV>
    > <DIV><EM><FONT face="Comic Sans MS"></FONT></EM>&nbsp;</DIV>
    > <DIV><EM><FONT face="Comic Sans MS">Corey....</FONT></EM></DIV></BODY></HTML>
    >
    > ------=_NextPart_000_01B2_01C6A203.D81BA5D0--



  3. #3
    Corey
    Guest

    Re: Got the Copy/Cut Code But what is the Paste Code

    Thanks Jason for the reply.

    What about COPY from sheet1 and paste to sheet2?

    Corey....



  4. #4
    Dana DeLouis
    Guest

    Re: Got the Copy/Cut Code But what is the Paste Code

    > This don't work :
    > [R59].Select
    > ActiveCell.Paste
    > What is a Paste Code ?


    Hi. Paste works a little differently. Excel uses a worksheet object, and
    not a range object.
    As a technique, select the word "Paste" in vba, and hit the F1 button. Then
    look under "WorkSheet" object.

    Sub Demo()
    [R59].Cut

    [R59].Select
    ActiveSheet.Paste
    End Sub

    or...

    Sub Demo2()
    [R59].Cut
    ActiveSheet.Paste ([R59])
    End Sub

    --
    HTH. :>)
    Dana DeLouis
    Windows XP, Office 2003


    "Corey" <[email protected]> wrote in message
    news:[email protected]...
    If this code will copy a Cell value:

    [R59].Select
    ActiveCell.Copy

    and this is a Cut code :

    [R59].Select
    ActiveCell.Cut

    What is a Paste Code ?
    This don't work

    [R59].Select
    ActiveCell.Paste



    What is the code equivalent to paste ?

    Corey....



  5. #5
    Corey
    Guest

    Re: Got the Copy/Cut Code But what is the Paste Code

    Thanks Dana,

    Not sure of the reason, but i think it could be because it is a formula, but
    i am getting a "0" value.
    I want to copy a (MAX) formula VALUE from sheet1 and place the value
    ONLY(Not the formula) to a cell in another sheet.

    If i click on the Cell where the value is pasted("0"), the FORMULA BAR
    displays the Formula from the Copied Cell in the other sheet, NOT the Actual
    Value.

    Any way around this that you know of ?
    Corey....


    "Dana DeLouis" <[email protected]> wrote in message
    news:[email protected]...
    >> This don't work :
    >> [R59].Select
    >> ActiveCell.Paste
    >> What is a Paste Code ?

    >
    > Hi. Paste works a little differently. Excel uses a worksheet object, and
    > not a range object.
    > As a technique, select the word "Paste" in vba, and hit the F1 button.
    > Then look under "WorkSheet" object.
    >
    > Sub Demo()
    > [R59].Cut
    >
    > [R59].Select
    > ActiveSheet.Paste
    > End Sub
    >
    > or...
    >
    > Sub Demo2()
    > [R59].Cut
    > ActiveSheet.Paste ([R59])
    > End Sub
    >
    > --
    > HTH. :>)
    > Dana DeLouis
    > Windows XP, Office 2003
    >
    >
    > "Corey" <[email protected]> wrote in message
    > news:[email protected]...
    > If this code will copy a Cell value:
    >
    > [R59].Select
    > ActiveCell.Copy
    >
    > and this is a Cut code :
    >
    > [R59].Select
    > ActiveCell.Cut
    >
    > What is a Paste Code ?
    > This don't work
    >
    > [R59].Select
    > ActiveCell.Paste
    >
    >
    >
    > What is the code equivalent to paste ?
    >
    > Corey....
    >




  6. #6
    Tom Ogilvy
    Guest

    Re: Got the Copy/Cut Code But what is the Paste Code

    Worksheets("sheet1").Range("A1").Copy _
    worksheets("sheet2").Range("A2")

    --
    Regards,
    Tom Ogilvy


    "Corey" wrote:

    > Thanks Jason for the reply.
    >
    > What about COPY from sheet1 and paste to sheet2?
    >
    > Corey....
    >
    >
    >


  7. #7
    Dana DeLouis
    Guest

    Re: Got the Copy/Cut Code But what is the Paste Code

    > I want to copy a (MAX) formula VALUE from sheet1 and place the value
    > ONLY(Not the formula) to a cell in another sheet.


    Hi. You are looking for "PasteSpecial".

    Worksheets("Sheet1").Range("R59").Copy
    Worksheets("Sheet2").Range("A1").PasteSpecial Paste:=xlPasteValues

    --
    HTH. :>)
    Dana DeLouis
    Windows XP, Office 2003


    "Corey" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks Dana,
    >
    > Not sure of the reason, but i think it could be because it is a formula,
    > but i am getting a "0" value.
    > I want to copy a (MAX) formula VALUE from sheet1 and place the value
    > ONLY(Not the formula) to a cell in another sheet.
    >
    > If i click on the Cell where the value is pasted("0"), the FORMULA BAR
    > displays the Formula from the Copied Cell in the other sheet, NOT the
    > Actual Value.
    >
    > Any way around this that you know of ?
    > Corey....
    >
    >
    > "Dana DeLouis" <[email protected]> wrote in message
    > news:[email protected]...
    >>> This don't work :
    >>> [R59].Select
    >>> ActiveCell.Paste
    >>> What is a Paste Code ?

    >>
    >> Hi. Paste works a little differently. Excel uses a worksheet object,
    >> and not a range object.
    >> As a technique, select the word "Paste" in vba, and hit the F1 button.
    >> Then look under "WorkSheet" object.
    >>
    >> Sub Demo()
    >> [R59].Cut
    >>
    >> [R59].Select
    >> ActiveSheet.Paste
    >> End Sub
    >>
    >> or...
    >>
    >> Sub Demo2()
    >> [R59].Cut
    >> ActiveSheet.Paste ([R59])
    >> End Sub
    >>
    >> --
    >> HTH. :>)
    >> Dana DeLouis
    >> Windows XP, Office 2003
    >>
    >>
    >> "Corey" <[email protected]> wrote in message
    >> news:[email protected]...
    >> If this code will copy a Cell value:
    >>
    >> [R59].Select
    >> ActiveCell.Copy
    >>
    >> and this is a Cut code :
    >>
    >> [R59].Select
    >> ActiveCell.Cut
    >>
    >> What is a Paste Code ?
    >> This don't work
    >>
    >> [R59].Select
    >> ActiveCell.Paste
    >>
    >>
    >>
    >> What is the code equivalent to paste ?
    >>
    >> Corey....
    >>

    >
    >




  8. #8
    Corey
    Guest

    Re: Got the Copy/Cut Code But what is the Paste Code

    Thank You kindly.

    Done the job precisely

    Corey....



    "Dana DeLouis" <[email protected]> wrote in message
    news:[email protected]...
    >> I want to copy a (MAX) formula VALUE from sheet1 and place the value
    >> ONLY(Not the formula) to a cell in another sheet.

    >
    > Hi. You are looking for "PasteSpecial".
    >
    > Worksheets("Sheet1").Range("R59").Copy
    > Worksheets("Sheet2").Range("A1").PasteSpecial Paste:=xlPasteValues
    >
    > --
    > HTH. :>)
    > Dana DeLouis
    > Windows XP, Office 2003
    >
    >
    > "Corey" <[email protected]> wrote in message
    > news:[email protected]...
    >> Thanks Dana,
    >>
    >> Not sure of the reason, but i think it could be because it is a formula,
    >> but i am getting a "0" value.
    >> I want to copy a (MAX) formula VALUE from sheet1 and place the value
    >> ONLY(Not the formula) to a cell in another sheet.
    >>
    >> If i click on the Cell where the value is pasted("0"), the FORMULA BAR
    >> displays the Formula from the Copied Cell in the other sheet, NOT the
    >> Actual Value.
    >>
    >> Any way around this that you know of ?
    >> Corey....
    >>
    >>
    >> "Dana DeLouis" <[email protected]> wrote in message
    >> news:[email protected]...
    >>>> This don't work :
    >>>> [R59].Select
    >>>> ActiveCell.Paste
    >>>> What is a Paste Code ?
    >>>
    >>> Hi. Paste works a little differently. Excel uses a worksheet object,
    >>> and not a range object.
    >>> As a technique, select the word "Paste" in vba, and hit the F1 button.
    >>> Then look under "WorkSheet" object.
    >>>
    >>> Sub Demo()
    >>> [R59].Cut
    >>>
    >>> [R59].Select
    >>> ActiveSheet.Paste
    >>> End Sub
    >>>
    >>> or...
    >>>
    >>> Sub Demo2()
    >>> [R59].Cut
    >>> ActiveSheet.Paste ([R59])
    >>> End Sub
    >>>
    >>> --
    >>> HTH. :>)
    >>> Dana DeLouis
    >>> Windows XP, Office 2003
    >>>
    >>>
    >>> "Corey" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>> If this code will copy a Cell value:
    >>>
    >>> [R59].Select
    >>> ActiveCell.Copy
    >>>
    >>> and this is a Cut code :
    >>>
    >>> [R59].Select
    >>> ActiveCell.Cut
    >>>
    >>> What is a Paste Code ?
    >>> This don't work
    >>>
    >>> [R59].Select
    >>> ActiveCell.Paste
    >>>
    >>>
    >>>
    >>> What is the code equivalent to paste ?
    >>>
    >>> Corey....
    >>>

    >>
    >>

    >
    >




+ 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