I have written a macro that pastes values in a column of each worksheet. When I run the code it just loops through the active worksheet a couple of times. I have tried adding ws. to the Range in the code but I get a compile error.
Can anybody help me with this?
Sub Aanvullen_adminitsratie_data()
    Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Worksheets
With ws
   Range("K2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.ClearContents
    Range("AA1").Copy
    Range("K2").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Range("J1048576").Select
    Selection.End(xlUp).Select
    Selection.Offset(0, 1).Select
    Range(Selection, Selection.End(xlUp)).Select
    Selection.FillDown
End With
    Next ws
   End Sub
 
    