Answers for "excel vba paste end"

0

excel vba paste end

Sub Paste_Other_Sheet_or_Book()

    'Cut or Copy and Paste to another worksheet
    Worksheets("sheet1").Range("A1").Copy Worksheets("sheet2").Range("B1") 'Copy
    Worksheets("sheet1").Range("A1").Cut Worksheets("sheet2").Range("B1") 'Cut

    'Cut or Copy and Paste to another workbook
    Workbooks("book1.xlsm").Worksheets("sheet1").Range("A1").Copy _ 
    Workbooks("book2.xlsm").Worksheets("sheet1").Range("B1") 'Copy
    Workbooks("book1.xlsm").Worksheets("sheet1").Range("A1").Cut _ 
    Workbooks("book2.xlsm").Worksheets("sheet1").Range("B1") 'Cut

    Application.CutCopyMode = False
End Sub
Posted by: Guest on April-08-2021

Browse Popular Code Answers by Language