Hi everybody,
I want to run a sub called ColVal on every worksheets of my workbook that start with "Sté". However it seems that my code only runs ColVal on my active worksheet.
Can someone please tell me what I am doing wrong? thank you in advance !
Chnaps
Sub ColValAll()
Dim w As Worksheet
For Each w In Worksheets
If Left(w.Name, 3) = "Sté" Then
Call ColVal
End If
Next w
End Sub
Sub ColVal()
Range("I62:I110").Select
Application.CutCopyMode = False
Selection.Copy
Range("I62").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
I want to run a sub called ColVal on every worksheets of my workbook that start with "Sté". However it seems that my code only runs ColVal on my active worksheet.
Can someone please tell me what I am doing wrong? thank you in advance !
Chnaps
Sub ColValAll()
Dim w As Worksheet
For Each w In Worksheets
If Left(w.Name, 3) = "Sté" Then
Call ColVal
End If
Next w
End Sub
Sub ColVal()
Range("I62:I110").Select
Application.CutCopyMode = False
Selection.Copy
Range("I62").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub