I am using your Cells product and creating a workbook from a template we have created. I have 4 sheets which are populated with data and then I have one sheet which I use Addcopy to dynamically create many new sheets. If I do not create new sheets I have no problem. If I create a new sheet then I cannot open the xls file without getting file errors. her is the code that executes to add new sheets. Any ideas?
wb.Worksheets.AddCopy("Facility")
wb.Worksheets.ActiveSheetIndex = x + 4
ws = wb.Worksheets.Item(x + 4)
If Len(ProcessLevel(x).ToString & " - " & ProcessLevelDisplayName(x).ToString) > 31 Then
ws.Name = (ProcessLevel(x).ToString)
Else
ws.Name = (ProcessLevel(x).ToString & " - " & ProcessLevelDisplayName(x).ToString.Replace("/", " "))
End If