Hi all,
i am working with VB6 code which writes data to excelsheet.cells from a RecordSet.
actually a lot of data is being written .when the data is less no problem occurs but when more than 800 columns and 12 rows are to be written then i get error 1004 "Application defined or object defined error".
i searched a lot for this error and finally introduced a delay just before writing to cells the data read from recordset(this data is just a number)
Although everything works fine with a 0.01 s delay BUT
the delay is hardcoded and i want to avoid it as it increases the time.
IS there any API or any way,any method by which i can wait for the excelsheet.cells to initialise and then go ahead with filling in the data.
may be something like "bool cellinitialized(excelsheet.cell(x,y))"
Any help will be highly appreciated.Thanks in advance.
code goes like this :
If Not IsNull(RecordSet(z).value) Then
Delay (10)
excelSheet.cells(x,y)=RecordSet(z)