Copy The Data from Source To Destination

     

    Copy The Data from Source To Destination In Selected

     

     

    Click on Image to Watch Video:

     

     

    Sub Copy_The_Data_By_Selecting_The_Workbook()

    'Declare The Source Workbook
    Dim SFilename As String
    SFilename = Application.GetOpenFilename
    Workbooks.Open (SFilename)
    Dim SWkb As Workbook
    Set SWkb = ActiveWorkbook

    'Define Source Range
    Dim SrcRng As Range
    Set SrcRng = Application.InputBox("Select The Source Range To Copy", "www.Tricks12345.com", Type:=8)

    'Define Destination Range
    Dim DestRng As Range
    Set DestRng = Application.InputBox("Select The Destination Range To Paste", "www.Tricks12345.com", Type:=8)

    SrcRng.Copy DestRng
    Application.CutCopyMode = xlCopy

    'Save and Close source workbook
    With SWkb
    .Save
    .Close
    End With

    'Nullifying Variables
    Set SrcRng = Nothing
    Set SWkb = Nothing

    End Sub

    Download The Workbook