Here is my code, and I got this error after it copies 63 times.
It needs to copy about 110 times.
It reads the value on each cell (A) "Tablename" worksheet and create a
new worksheet by copying another worksheet "Template", and name the
worksheet as the value on the cell.
Please help as I am working on one important project. Thanks a lot!!
Sub PopulateWorkSheet()
Dim totalrow, iSheet, rownum, v_col, icol As Integer
Dim mySht, mdata As Worksheet
Dim sheetname As String
Dim fnd As Range
Dim v_cell_value As Variant
totalrow = ActiveWorkbook.Worksheets("Tablename").UsedRange.R ows.Count
For iSheet = 1 To totalrow
Worksheets("Template").Copy After:=Worksheets(Worksheets.Count)
Set mySht = Worksheets(Worksheets.Count)
sheetname = ActiveWorkbook.Worksheets("Tablename").Cells(iShee t,
1).Value
mySht.Name = sheetname
mySht.Cells(1, 1).Value = sheetname
Set mdata = Worksheets("List")
Set fnd = mdata.Columns(1l).Find(sheetname, LookAt:=xlWhole)
rownum = fnd.Row
v_col = 5
icol = 1
Do While mdata.Cells(rownum, v_col).Value <> ""
v_cell_value = mdata.Cells(rownum, v_col).Value
mySht.Cells(2, icol).Value = v_cell_value
v_col = v_col + 1
icol = icol + 1
Loop
Next iSheet
End Sub