I'm just makin test in order to fill a range with values but get
ComException Error when trying to set the result. ("Exception from
Can someone tell me what I'm doing wrong ?
Thks for help.
Dim numberOfRows As Integer = 10
Dim numberOfColumns As Integer = 10
Dim theValues(10, 10) As Object
For i As Integer = 0 To i < numberOfRows
For j As Integer = 0 To j < numberOfColumns
theValues(i, j) = i * j
oExcel = CType(applicationObject, Excel.Application)
Dim theRange As Excel.Range = oExcel.Range("A1", "J10")
theRange.Value2 = theValues <- HERE IS THE ERROR
Catch ex As Exception
The point is that (Ok for the zero based thing ^^) it works ifd I use
automation object in a winapp.
But in my addin, it fails -
Copyright © 2001-2012 GNT Media