I'm using the code below. If I only have one hidden sheet it works fine. but i have multiple hidden sheets abd at that point it no longer functions properly.
Please help. thank you,
Please help. thank you,
Code:
Sub AutoAddSheet()
Application.ScreenUpdating = False
Dim LastRow As Long, MyCell As Range
LastRow = Sheets("Info Entry").Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
For Each MyCell In Sheets("Info Entry").Range("N26:N" & LastRow)
Sheets(MyCell.Value).Visible = True
Sheets(MyCell.Value).Copy After:=Sheets(Sheets.Count) 'Create a new worksheet as a copy of Sheet number
Sheets(Sheets.Count).Name = MyCell.Offset(0, -13).Value 'Renames the new worksheets
Sheets(MyCell.Value).Visible = False
Next MyCell
Worksheets("Info Entry").Activate
Application.ScreenUpdating = True
End Sub
Last edited by a moderator: