[RESOLVED] Clearing a Structure
Hi trying to check I have cleared this correctly. Seems to have worked byt I seem to get anomolies somethimes that might have nothing to do with the clear part.
I declare the structure. Dimension it, then when I need to clear call the Sub to clear it.
1) Will this clear it all, including the array within the structure?
2) Incidentally I dimension it after as it is here in the example. Is there a way of doing it when actually needed so I have a better idea of how many items to allocate as opposed to an arbitrary number as here in the example of 30?
Code:
Structure TestList
Dim TL_name As String
Dim TL_total As Integer
Dim TL_Sub_total_Array() As Integer
Dim TL_reference As Integer
End Structure
Dim TotalList(30) As TestList
Private Sub Clear_Rows_Display()
Dim count1 As Integer
For count1 = 0 To TestList.GetUpperBound(0)
Array.Clear(TestList, 0, count1)
Next
End Sub
Thanks in advance.