Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Go Back  Xtreme Visual Basic Talk > > > Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))


Reply
 
Thread Tools Display Modes
  #1  
Old 04-20-2009, 11:45 AM
jtammyg jtammyg is offline
Freshman
 
Join Date: Jun 2008
Posts: 36
Default Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))


Hi!

I have a windows form application in Vb 2008 pulling data off SQL Server 2005

I need to be able to create an Excel report on the fly and dump the results from a query onto the first Excel sheet. After that I run another query and need to dump the results to the next sheet in the same workbook. Problem is that this query may spit back more that 65356 rows. Therefore I need to put the first 65000 rows in the second sheet and then the rest in the next sheet and so on and so forth.

Unfortunately, when I fix the sheet_var = 2 to start dumping in the second sheet, I get an index error. Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))

The error is occuring in this line:

oSheet = obook.Worksheets.Add(After:=obook.Worksheets("Page " & sheet_count))




Here is the code:

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Cursor.Current = System.Windows.Forms.Cursors.WaitCursor

        Dim cnn As SqlConnection
        Dim connectionString As String
        Dim sql As String

        Dim cnn1 As SqlConnection
        Dim sql1 As String


        Dim filename As String
        Dim xlApp As New Microsoft.Office.Interop.Excel.Application
        Dim xlWorkBook As Excel.Workbook
        Dim misValue As Object = System.Reflection.Missing.Value

        xlApp = New Excel.ApplicationClass
        xlWorkBook = xlApp.Workbooks.Add(misValue)


        Dim oRng As Excel.Range

        xlApp = New Excel.Application
        xlWorkBook = xlApp.Workbooks.Add


        Dim oExcel As New Excel.Application 'Declare New Excel Object
        Dim obook As Excel.Workbook = oExcel.Workbooks.Add 'Add Workbook to excel
        Dim oSheet As Excel.Worksheet = obook.Worksheets(1) 'Declare Excel Worksheet


        Dim r As Integer
        Dim c As Integer
        Dim column_count As Integer
        Dim ROW_COUNT As Integer
        Dim excel_count As Integer
        Dim sheet_count As Integer

        'Code: 
        excel_count = 1 ' set excel count to 1 as idicator to  increment for each row to know when 65K records have been processed
        sheet_count = 1 ' set sheet count to 1 (excel sheet integer starts at 1 not 0
        ROW_COUNT = 0   ' set array row count to 0


        oSheet.Name = "Page " & sheet_count ' name the first sheet Page 1





        connectionString = "data source='our_server_1'; Initial catalog=Exception_Reports;Integrated Security = True;"
        cnn = New SqlConnection(connectionString)
        cnn.Open()
        sql = "Select [File Type],[Task],count(*) as [Error Count] from Exception_Reports.dbo.Exception_Filter_by_error group by [File Type],[task] order by [task]"
        Dim dscmd As New SqlDataAdapter(sql, cnn)
        Dim ds As New DataSet
        dscmd.Fill(ds)


        ' ========================================================================
        '        ' it creates the sheet1 containing Error Report Per File Type
        '        '========================================================================
        'obook.Worksheets(1).Select()

        'sheet_count = 1


        '        'this inserts the DR logo on the first sheet
        CType(oExcel.Workbooks(1).Worksheets(1), Microsoft.Office.Interop.Excel.Worksheet).Activate()
        oExcel.Workbooks(1).Worksheets(1).Pictures.Insert("C:\Program Files\DiscoverReady\Exception Reporting Tool\DR logo.jpg").Select()
        '        'Excel.Workbooks(1).worksheets("Sheet1").Pictures.Insert(System.IO.Path.Combine(GetAppPath(), "resized DR logo 3.jpg")).Select()


        '        'this inserts the sheet title and formats it
        oExcel.Workbooks(1).Worksheets(1).Cells(4, 4) = "Error Report Per File Type"
        oExcel.Workbooks(1).Worksheets(1).Cells(4, 4).Font.Size = 14
        oExcel.Workbooks(1).Worksheets(1).Cells(4, 4).Font.Bold = True


        ' CType(oExcel.Workbooks(1).Worksheets(1), Microsoft.Office.Interop.Excel.Worksheet).Name = "Error Report Per File Type"


        Dim i As Integer = 1
        For col = 0 To ds.Tables(0).Columns.Count - 1
            oSheet.Cells(9, i).value = ds.Tables(0).Columns(col).ColumnName
            oSheet.Cells(9, i).EntireRow.Font.Bold = True
            i += 1
        Next
        i = 10
        Dim k As Integer = 1
        For col = 0 To ds.Tables(0).Columns.Count - 1
            i = 10
            For row = 0 To ds.Tables(0).Rows.Count - 1
                oSheet.Cells(i, k).Value = ds.Tables(0).Rows(row).ItemArray(col)
                i += 1
            Next
            k += 1
        Next

        'oRng = CType(oExcel.Workbooks(1).Worksheets("Error Report Per File Type"), Microsoft.Office.Interop.Excel.Worksheet).Range("A8", "C8")
        'oRng.EntireColumn.AutoFit()




        '=================================================================================================
        ' it creates the sheet2 containing Complete Error Report if user selects YES. If there are more
        ' than 65000 rows, it will create another sheet and continue there 
        '=================================================================================================


        cnn1 = New SqlConnection(connectionString)
        cnn1.Open()
        sql1 = "Select * from Exception_Reports.dbo.Exception_Filter_by_error order by [Doc ID]"
        Dim dscmd1 As New SqlDataAdapter(sql1, cnn1)
        Dim ds1 As New DataSet
        dscmd1.Fill(ds1)

        'sheet_count += 1
        sheet_count = 2 ' set sheet count to 1 (excel sheet integer starts at 1 not 0

        Dim dataArray(ds1.Tables(0).Rows.Count - 1, ds1.Tables(0).Columns.Count - 1) As Object ' Declare Array object with size (row count by column count)

        'Add columns to Sheet 
        For column_count = 0 To ds1.Tables(0).Columns.Count - 1
            oSheet.Cells(1, column_count + 1) = ds1.Tables(0).Columns(column_count).ColumnName
        Next column_count

        'ProgressBar.Value = 0
        'ProgressBar.Maximum = ds1.Tables(0).Rows.Count - 1

        For r = 0 To ds1.Tables(0).Rows.Count - 1 'For each row in dataset
            For c = 0 To ds1.Tables(0).Columns.Count - 1 'for each column 
                dataArray(ROW_COUNT, c) = ds1.Tables(0).Rows(r).Item(c) 'add column data into array
            Next c

            If excel_count = 65000 Then 'record count is 65000
                oSheet.Range("A10").Resize(excel_count, ds1.Tables(0).Columns.Count - 1).Value = dataArray 'Copy Array into excel sheet
                oSheet = obook.Worksheets.Add(After:=obook.Worksheets("Page " & sheet_count)) 'add new sheet to workbook after previous sheet
                sheet_count += 1 'increment sheet count by one
                oSheet.Name = "Page " & sheet_count 'name new sheet 

                excel_count = 1 'reset to excel count to 1
                ROW_COUNT = 0 'reset the row count for array to 0
                'Array.Clear(dataArray, 0, 65000)

                'reset the array
                ReDim dataArray(ds1.Tables(0).Rows.Count - 1, ds1.Tables(0).Columns.Count - 1)

                'Add column headers to new sheet 
                For column_count = 0 To ds1.Tables(0).Columns.Count - 1
                    oSheet.Cells(9, column_count + 1) = ds1.Tables(0).Columns(column_count).ColumnName
                Next column_count
            Else 'if records not equal to 65K 
                excel_count += 1 'Add 1 to excel count
                ROW_COUNT += 1  'Add 1 to array row count
            End If

            If r = ds1.Tables(0).Rows.Count - 1 Then 'If this is the final record 
                oSheet.Range("A10").Resize(excel_count, ds1.Tables(0).Columns.Count - 1).Value = dataArray 'copy array to excel sheet
            End If
            'ProgressBar.PerformStep()
        Next r


        '====================================================
        '        ' Save Exception Report to the network
        '        '====================================================

        filename = "R:\Exception Reports\Exception Report for " & Now().Year & "-" & Now().Month & "-" & Now().Day & " " & Date.Now.ToString("hh mm ss") & ".xls"
        obook.SaveAs(filename)
        'obook.SaveAs(filename) 'Save the excel sheet
        oSheet = Nothing 'set objects to nothing
        oExcel = Nothing
        GC.Collect() 'Garabarage Collection to reclaim space
        'ProgressBar.Value = 0
        'Exporting_Label.Visible = False
        MessageBox.Show("Export Complete", "Finish", MessageBoxButtons.OK, MessageBoxIcon.Information)



        '=========================================================
        'opens R folder automatically after report has been saved
        '=========================================================

        System.Diagnostics.Process.Start("R:\Exception Reports\")


        ' The excel is created and opened for insert value. We most close this excel using this system
        Dim pro() As Process = System.Diagnostics.Process.GetProcessesByName("EXCEL")
        For Each f As Process In pro
            f.Kill()
        Next

you help is greatly appreacited.

Since I've spent the past week trying to figure ways to do this (sorry I am a newbie) :-(

Thanks a lot!

Tammy

Last edited by jtammyg; 04-21-2009 at 08:07 AM.
Reply With Quote
  #2  
Old 04-20-2009, 12:18 PM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

[Edit: Btw, Tammy, you might want to edit your first post in order to put some line-breaks in your code so that this thread is not so wide... Just a thought. - Mike]

Hi Tammy,

I would break out that line into two:

Code:
dim afterSheet As Excel.Worksheet = obook.Worksheets("Page " & sheet_count)
oSheet = obook.Worksheets.Add(After:=afterSheet)
This way you'll know where exactly the error is occurring. I suspect that the problem is that there is no worksheet named "Page " & sheet_count. So you need to think about this. You also need to make sure that your 'sheet_count' holds the right number! When the error occurs, hover your mouse over the 'sheet_count' variable to see what value it holds.

You can index your worksheets by number as well as by name, so if you simply wish to put your new worksheet at the end (furthest at the right) then you can do so like this:

Code:
dim afterSheet As Excel.Worksheet = obook.Worksheets(obook.Worksheets.Count)
oSheet = obook.Worksheets.Add(After:=afterSheet)
Hope this gets you going!

Mike
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #3  
Old 04-20-2009, 01:00 PM
jtammyg jtammyg is offline
Freshman
 
Join Date: Jun 2008
Posts: 36
Default

Hi Mike!!

Thank you so much for your prompt reply with the correct answer as usual!!

That works fine....but I also noticed that the last column on my table which is Performed Date is not getting dumped onto the spreadsheet.

Do you want me to start a new thread for that?


Thanks a lot again for your time.

After your answer I will post how I solved this with your code for future reference.

Thanks again!

Tammy
Reply With Quote
  #4  
Old 04-24-2009, 07:17 AM
Mike Rosenblum's Avatar
Mike Rosenblum Mike Rosenblum is offline
Microsoft Excel MVP

Forum Leader
* Guru *
 
Join Date: Jul 2003
Location: New York, NY, USA
Posts: 7,848
Default

Hi Tammy,

No, you don't need to start a new thread, you already have your code posted.

That said, that's a lot of code! I'm not really sure why your last column of your table is not getting dumped onto the spreadsheet, but I *think* the problem might be here:

Code:
If r = ds1.Tables(0).Rows.Count - 1 Then 
    'If this is the final record then copy array to excel sheet
    oSheet.Range("A10").Resize(excel_count, ds1.Tables(0).Columns.Count - 1).Value = dataArray 
End If
I think that you should be using ds1.Tables(0).Columns.Count and not ds1.Tables(0).Columns.Count - 1, that way you will be getting the full number of columns of data. (That is, the Range.Resize() method takes RowSize and ColumnSize arguments that are base-1, not base-0.) So I would try this:

Code:
If r = ds1.Tables(0).Rows.Count - 1 Then 
    'If this is the final record then copy array to excel sheet
    dim numRows As Integer = excel_count
    dim numCols As Integer = ds1.Tables(0).Columns.Count
    dim pasteRange As Excel.Range = oSheet.Range("A10").Resize(numRows, numCols)
    pasteRange.Value = dataArray 
End If
Give it a try. If this is not the issue, let us know and I'll take another look. (You might also want to set breakpoints and/or step through your code to see what's not working as expected.)

Another thing that stood out for me, I would not kill all Excel processes unless you are certain that all the Excel processes you are creating are yours. That is, instead of your code here:

Code:
' The excel is created and opened for insert value. We most close this excel using this system
Dim pro() As Process = System.Diagnostics.Process.GetProcessesByName("EXCEL")
For Each f As Process In pro
    f.Kill()
Next
I would instead use a good cleanup procedure, as follows, so that Process.Kill is not necessary. To see how to make a solid cleanup procedure when Automating Excel, see the first post in the .NET Office Automation tutorial. In your case, the cleanup procedure might look something like this:

Code:
GC.Collect()
GC.WaitForPendingFinalizers()
GC.Collect()
GC.WaitForPendingFinalizers()

System.Runtime.InteropServices.Marshal.FinalReleaseComObject(oRng)
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(oSheet)

oBook.Close(SaveChanges:=False) ' Or 'True', your choice.
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(oBook)

oExcel.Quit()
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(oExcel)
With a proper cleanup code, like the above, you should not need to use Process.Kill at all. But if you are still stuck and absolutely have to, then you should only kill your *own* Excel process and not all of them that are running on the system. You wouldn't want to kill an Excel application that the user is currently using -- and have them lose all their work.

If you feel compelled to used Process.Kill, then you should close down only *your* Excel instances, which can be done by following the instructions here: Closing your Excel.Application - Yet Another Extreme Measure.


Lastly, it looks like you are creating 4 different Excel application instances? Perhaps this is why you were resorting to using Process.Kill on all Excel processes? In your code, I see:

Code:
Dim xlApp As New Microsoft.Office.Interop.Excel.Application
and then later:

Code:
xlApp = New Excel.ApplicationClass
and then:

Code:
xlApp = New Excel.Application
and then finally:

Code:
Dim oExcel As New Excel.Application
You seem to only use the oExcel reference in your code, so I would remove the xlApp variable and all subsequent use of it and I think you should be in good shape.

I think that this is all I could find, Tammy, I hope this helps!
Let us know how it goes...

Mike
__________________
My Articles:
| Excel from .NET | Excel RibbonX using VBA | Excel from VB6 | CVErr in .NET | MVP |
Avatar by Lebb
Reply With Quote
  #5  
Old 04-27-2009, 01:13 PM
jtammyg jtammyg is offline
Freshman
 
Join Date: Jun 2008
Posts: 36
Default

Hi Mike!

I spoke too soon. I noticed that if the datatable has more than 65000 then this works fine and now i get the last column.

But if the datatable has less than 65000 I get the same bad index error.


What is wrong with my code? Basically I want to do this:

if rows >= 65000 then copy onto sheet 2 up to row 65000 and the next rows should be inserted into row 9 after i put all the logo and titles.


if rows < 65000 then put logos and titles in row 9 and paste the data.


What is wrong with this, Mike?

Thanks a lot!!!

Best regards,

Tammy

Code:
 '=================================================================================================
        ' it creates the sheet2 containing Complete Error Report if user selects YES. If there are more
        ' than 65000 rows, it will create another sheet and continue there 
        '=================================================================================================


        cnn1 = New SqlConnection(connectionString)
        cnn1.Open()
        sql1 = "Select * from Exception_Reports.dbo.Exception_Filter_by_error order by [Doc ID]"
        Dim dscmd1 As New SqlDataAdapter(sql1, cnn1)
        Dim ds1 As New DataSet
        dscmd1.Fill(ds1)

        oSheet = obook.Worksheets.Add(After:=obook.Worksheets("Error Report Per File Type")) 'add new sheet to workbook after previous sheet

        Dim dataArray(ds1.Tables(0).Rows.Count - 1, ds1.Tables(0).Columns.Count - 1) As Object ' Declare Array object with size (row count by column count)

        'Add columns to Sheet 
        For column_count = 0 To ds1.Tables(0).Columns.Count - 1
            oSheet.Cells(9, column_count + 1) = ds1.Tables(0).Columns(column_count).ColumnName
            oSheet.Cells(9, column_count + 1).EntireRow.Font.Bold = True
        Next column_count



        For r = 0 To ds1.Tables(0).Rows.Count - 1 'For each row in dataset
            For c = 0 To ds1.Tables(0).Columns.Count - 1 'for each column 
                dataArray(ROW_COUNT, c) = ds1.Tables(0).Rows(r).Item(c) 'add column data into array
            Next c

            If excel_count = 65000 Then 'record count is 65000
                '        'this inserts the DR logo on the first available sheet
                CType(oExcel.Workbooks(1).Worksheets(2), Microsoft.Office.Interop.Excel.Worksheet).Activate()
                oExcel.Workbooks(1).Worksheets(2).Pictures.Insert("C:\Program Files\DiscoverReady\Exception Reporting Tool\DR logo.jpg").Select()
                '        'Excel.Workbooks(1).worksheets("Sheet1").Pictures.Insert(System.IO.Path.Combine(GetAppPath(), "resized DR logo 3.jpg")).Select()


                '        'this inserts the sheet title and formats it
                oExcel.Workbooks(1).Worksheets(2).Cells(4, 4) = "Complete Error Report"
                oExcel.Workbooks(1).Worksheets(2).Cells(4, 4).Font.Size = 14
                oExcel.Workbooks(1).Worksheets(2).Cells(4, 4).Font.Bold = True


                CType(oExcel.Workbooks(1).Worksheets(2), Microsoft.Office.Interop.Excel.Worksheet).Name = "Complete Error Report " & sheet_count 'name new sheet 
                oSheet.Range("A10").Resize(excel_count, ds1.Tables(0).Columns.Count).Value = dataArray 'Copy Array into excel sheet

                Dim afterSheet As Excel.Worksheet = obook.Worksheets(obook.Worksheets.Count)
                oSheet = obook.Worksheets.Add(After:=afterSheet)
                sheet_count += 1 'increment sheet count by one
                oSheet.Name = "Complete Error Report " & sheet_count 'name new sheet 


                excel_count = 1 'reset to excel count to 1
                ROW_COUNT = 0 'reset the row count for array to 0


                'reset the array
                ReDim dataArray(ds1.Tables(0).Rows.Count - 1, ds1.Tables(0).Columns.Count - 1)

                'Add column headers to new sheet
                For column_count = 0 To ds1.Tables(0).Columns.Count - 1
                    oSheet.Cells(9, column_count + 1) = ds1.Tables(0).Columns(column_count).ColumnName
                    oSheet.Cells(9, column_count + 1).EntireRow.Font.Bold = True
                Next column_count
                'oRng = CType(oExcel.Workbooks(1).Worksheets("Complete Error Report " & sheet_count), Microsoft.Office.Interop.Excel.Worksheet).Range("A:L")
                oRng = CType(oExcel.Workbooks(1).Worksheets("Complete Error Report " & sheet_count), Microsoft.Office.Interop.Excel.Worksheet).Range("A:L")
                oRng.EntireColumn.AutoFit()
            Else 'if records not equal to 65K 
                excel_count += 1 'Add 1 to excel count
                ROW_COUNT += 1  'Add 1 to array row count
            End If

            If r = ds1.Tables(0).Rows.Count - 1 Then 'If this is the final record 
                oExcel.Workbooks(1).Worksheets("Complete Error Report " & sheet_count).Pictures.Insert("C:\Program Files\DiscoverReady\Exception Reporting Tool\DR logo.jpg").Select()
                '        'Excel.Workbooks(1).worksheets("Sheet1").Pictures.Insert(System.IO.Path.Combine(GetAppPath(), "resized DR logo 3.jpg")).Select()


                '        'this inserts the sheet title and formats it
                oExcel.Workbooks(1).Worksheets("Complete Error Report " & sheet_count).Cells(4, 4) = "Complete Error Report"
                oExcel.Workbooks(1).Worksheets("Complete Error Report " & sheet_count).Cells(4, 4).Font.Size = 14
                oExcel.Workbooks(1).Worksheets("Complete Error Report " & sheet_count).Cells(4, 4).Font.Bold = True


                For column_count = 0 To ds1.Tables(0).Columns.Count - 1
                    oSheet.Cells(9, column_count + 1) = ds1.Tables(0).Columns(column_count).ColumnName
                    oSheet.Cells(9, column_count + 1).EntireRow.Font.Bold = True
                Next column_count

                CType(oExcel.Workbooks(1).Worksheets("Complete Error Report " & sheet_count), Microsoft.Office.Interop.Excel.Worksheet).Name = "Complete Error Report " & sheet_count 'name new sheet 
                oSheet.Range("A10").Resize(excel_count, ds1.Tables(0).Columns.Count).Value = dataArray 'copy array to excel sheet
            End If


        Next r
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX)) Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
 
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
 
-->