Link to home
Start Free TrialLog in
Avatar of JamesDBuskirk
JamesDBuskirkFlag for United States of America

asked on

vb 2008 sortedlist within a structure

"Object reference not set to an instance of an object" is the error I receive. Usually I declare these with the NEW qualifier, but that was not allowed in a structure.

 Private Structure slArray
        Dim ProviderandCases As SortedList
        Dim ProviderandCharges As SortedList
        Dim PayerPrimaryandCharges As SortedList
        Dim PayerPrimaryandCases As SortedList
        Dim MDandNonMDCharges As SortedList
        Dim MDandNonMDCases As SortedList
        Dim MDandNonMDMedicareFFS01Charges As SortedList
        Dim MDandNonMDMedicareFFS01Cases As SortedList
    End Structure
    Private slTotalsTable(13) As slArray   ' 0 will be Totals, 1- 12 will be months

' this is in a subroutine
            For ii As Integer = 0 To 12
                slTotalsTable(ii).ProviderandCases.Clear()
                slTotalsTable(ii).ProviderandCharges.Clear()
                slTotalsTable(ii).PayerPrimaryandCharges.Clear()
                slTotalsTable(ii).PayerPrimaryandCases.Clear()
                slTotalsTable(ii).MDandNonMDCharges.Clear()
                slTotalsTable(ii).MDandNonMDCases.Clear()
                slTotalsTable(ii).MDandNonMDMedicareFFS01Charges.Clear()
                slTotalsTable(ii).MDandNonMDMedicareFFS01Cases.Clear()
            Next

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JamesDBuskirk

ASKER

Excellent, thank you!