I was told by my instructor that instead of clearing all of the items in the array, there is a way to clear the enture array by doing something and I don't remeber what it was. Below is my code for my array:
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
sublistofvalues = sublistofvalues + 1
listofvalues(sublistofvalues) = listboxTickerSymbols.SelectedItem
listofvalues2(sublistofvalues) = Val(txtStockPrice.Text)
listofvalues3(sublistofvalues) = Val(txtStockQuantity.Text)
listofvalues4(sublistofvalues) = Val(txtStockPrice.Text * txtStockQuantity.Text)
Dim stepthruarray As Long
lblTickerSymbol.Text =
""
lblStockPrice.Text =
""
lblStockQuantity.Text =
""
lblTotalValue.Text =
""For stepthruarray = 1 To sublistofvalues Step 1
lblTickerSymbol.Text &= listofvalues(stepthruarray) & vbCrLf
lblStockPrice.Text &= listofvalues2(stepthruarray) & vbCrLf
lblStockQuantity.Text &= listofvalues3(stepthruarray) & vbCrLf
lblTotalValue.Text &= listofvalues4(stepthruarray) & vbCrLf
NextMe.txtStockPrice.Clear()
Me.txtStockQuantity.Clear()
Enter your message below
Sign in or Join us (it's free).