Hello, I am getting the "object required" error when I try to perform a for each command. Basically, I want, for each string text in a defined array, create a new spreadsheet. However, I got stuck at the for each command. Any help would be appreciated. The code is as follows: Dim rng As Range
Dim cntpies As Range
Dim cntpy As Variant
Dim tabela As String
Worksheets("Lista").Range(Selection, Selection.End(xlDown)).Name = "cntpies"
For Each cntpy In cntpies
tabela = "T." & cntpy
Set WSNew = Worksheets.Add(After:=Sheets(ActiveSheet.Index)).Name = tabela
Next
Dim cntpies As Range
Dim cntpy As Variant
Dim tabela As String
Worksheets("Lista").Range(Selection, Selection.End(xlDown)).Name = "cntpies"
For Each cntpy In cntpies
tabela = "T." & cntpy
Set WSNew = Worksheets.Add(After:=Sheets(ActiveSheet.Index)).Name = tabela
Next