0
votes

Please help, this code only runs in one worksheet if code to consider "Range to ActivateSheet.Paste". I want to run this to all sheets, but when I input the code, below, there's an appearing error "Next Without For". Appreciate any insights :)

Dim ws As Worksheet

    For Each ws In ThisWorkbook.Worksheets
        ws.Activate
    
    Range("G25").Select
    Selection.End(xlDown).Select
    Range(Selection, Selection.End(xlToRight)).Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("E25").Select
    Selection.End(xlDown).Select
    ActiveCell.Offset(0, 2).Range("A1:E1").Select
    Range(Selection, Selection.End(xlUp)).Select
    ActiveCell.Activate
    ActiveSheet.Paste
    

Next ws End Sub

1

1 Answers

0
votes

Just figure out the solution. Removing Application.CutCopyMode = False and ActiveCell.Activate, placing E