• Ask a Question
150
Insert Image Size must be less than < 5MB.
    Ask a Question
    Cancel
    150
    More answer You can create 5 answer(s).
      Ask a Poll
      Cancel
      Top Contributor

      vba copy sheet

      I want to copy the data from sheet 5 to sheet 6 automacticlly once I’ve imported the data.  I would also like for the data to paste starting on cell B1.

      Thx.

      Asked by fenway33 on March 1, 2018 in VBA.
      1 Answers
      Expert

      This code must be placed in the “Sheet” and not in “Module1”.  See pic.

      RE: vba copy sheet

      Whenever something is added to “Sheet5” the macro will run automatically, coping the content from sheet 5 to sheet 6 cell B1.

      Private Sub Worksheet_SelectionChange(ByVal Target As Range)
      Dim ws5 As Worksheet
      Dim ws6 As Worksheet
      Set ws5 = Worksheets(“Sheet5”)
      Set ws6 = Worksheets(“Sheet6”)

      ws5.UsedRange.Copy Destination:=ws6.Range(“B1”)
      End Sub

      Answered by Hyside2 on March 3, 2018..