Deselect Cells That Have Been Copied

  • I have a piece of coding that copies a range of cells from a worksheet to another workbook and then returns the focus to the initial worksheet. On return to that initial worksheet the range of selected cells is still selected/highlighted, even though the active cell is outside that range. How do I unselect the previously selected range of cells, to remove the rotating, dotted line from around them?

    1. Windows("SM_Performance.xlsm").Activate
    2. Range("C3:C102").Select
    3. Selection.Copy
    4. Windows("M400AD.xlsm").Activate
    5. Range("A3").Select
    6. Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    7. :=False, Transpose:=False
    8. Windows("SM_Performance.xlsm").Activate
    9. Range("K2").Select
  • Re: Deselect Cells That Have Been Copied

    Quote from pike;768882


    1. Workbooks("SM_Performance.xlsm").Sheets("Lists").Range("A3:C102").Copy Destination:=Workbooks("M400AD.xlsm").Sheets("Sheet1").Range("A3")


    Please make me correct if I am wrong...
    This method will use xlPasteAll while OP wants to paste Values only and that cannot be specified with the destination range in the method you proposed.