1

I have been using this same routine for over 1.5 years with no problem then suddenly today I get the following error:

Exception from HRESULT: 0x800A03EC

My code reads an excel range into an array processes the array then puts the array back into the excel sheet. It has been processing over 52000 rows but today it fails at 5000 rows!

I am really stuck with this.

My code is the following:

Dim arrProcess As Array
Dim intRowNum As Integer = xlWorksheet1.Cells.CurrentRegion.Rows.Count

arrProcess = xlWorksheet1.Range("A2:AD" & intRowNum).Value

'do some processing

'Put array back to worksheet
xlWorksheet1.Range("A2:AD" & intRowNum).Value = arrProcess

'empty array
arrProcess = Nothing

Even if I do not process the array at all and put it straight back in I get an error.

Cheers

Wagner DosAnjos
  • 6,304
  • 1
  • 15
  • 29
perryni
  • 35
  • 2
  • 5
  • I suggest you check if the spreadsheet is in read-only mode or has protected cells. Also check if you can update the spreadsheet manually in Excel. – Wagner DosAnjos Oct 09 '14 at 15:01
  • The spreadsheet is not in read only mode and doesn't haven't have protected cells. I have checked and I can update the spreadsheet manually. – perryni Oct 09 '14 at 15:13

0 Answers0