ProfReynolds
Programmer
I'm trying to create a workbnook using VB6. Basicall, I copy a worksheet, set the new worksheet name, and set a parameter on the worksheet. But VB6 (using office 11 excel object) will crash when I try to create the 134th sheet.
Do I need to flush or commit? Is this a VB limit?
Alternatevely, I could call a VBA script within the wrokbook - but I do not know how to do that.
This code crashes when SheetNo=123:
Do I need to flush or commit? Is this a VB limit?
Alternatevely, I could call a VBA script within the wrokbook - but I do not know how to do that.
This code crashes when SheetNo=123:
Code:
Set oExcelWs = oExcelWb.Sheets("SourceSheet")
oExcelWs.Activate
For SheetNo = 1 To 300
oExcelWs.Copy Before:=oExcelWb.Sheets(SheetNo+4)
Next