c the code
Sub GetFalseItems()
Dim Counter As Integer
Counter = 5
Worksheets("PLA").Range("A5:AD100").ClearContents
For Each c In Worksheets("060107").Range("A1: A200")
If c.Offset(0, 8).Value = "False" Then
Worksheets("PLA").Range("A" & Counter).Value = c.Value
Counter = Counter + 1
End If
Next c
End Sub
#
This code is written in "ThisWorkbook"
There are another 30 sheets "060107" series... like "060207", "060307" etc.
Now if i change the name of the sheet "PLA" from Excel then the macro does not run. same as with other sheet.
Is there any way in which i can make things dynamic.. so that even some user changes the name from excel itself, the code should adjust automatically and macro should run as before.
Bookmarks