hi!
Can't seem to find the fault in my code. Returns an Object required -error.
I think the problem lies where it finds the sheet with the *support*-part and the sets it as the active worksheet...
Can't seem to find the fault in my code. Returns an Object required -error.
I think the problem lies where it finds the sheet with the *support*-part and the sets it as the active worksheet...
Code:
Sub help()
Dim wscount As Integer
Dim ws As Worksheet
wscount = ThisWorkbook.Worksheets.Count
For i = 2 To wscount
If Worksheet.Name Like "*Support*" Then
Set ws = ActiveWorksheet
Set ws1 = Sheets("Data")
ws.[B15].Value = ws1.[E5].Value
ws.[B21].Value = ws1.[E6].Value
ws.[B43].Value = ws1.[E10].Value
ws.[B44].Value = ws1.[E11].Value
ws.[B45].Value = ws1.[E12].Value
ws.[B47].Value = ws1.[E13].Value
ws.[B15].Value = ws1.[E5].Value
End If
Next i
End Sub