Need a macro for Paste

Important Notice


Please note that on 14th December 2023 users will experience an expected outage whilst we make upgrades to our network. We anticipate this process may take a couple of hours and so we apologise in advance for any inconvenience.

  • Hello everyone,
    I always think it's going to be easy this time, but then I hit a snag.
    I have created buttons on the ribbon for cut, copy and paste. I know that they already exist, but my clients need everything on one custom tab.
    The macros for Cut and Copy are:

    Code
    Sub Cut()
    Selection.Cut
    End Sub
    
    
    Sub Copy()
    Selection.Copy
    End Sub


    Simple and they work great. But the same process does not work for a PASTE button. Can anyone help me with code for this? Of course, it will be used after pressing the Cut or Copy button.


    Thanks,
    AX

  • Re: Need a macro for Paste


    I think you need to specify a place to paste.


    For instance,


    sheets("sheet1").range("A1").paste xlpastevalues


    After copying, will paste in sheet 1 under cell reference A1, pasting as values

  • Re: Need a macro for Paste


    Quote

    but my clients need everything on one custom tab


    Then you are going to need a Ribbon Editor - a simple "Ribbon Editor Excel" search will find some good examples, and free.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!