Hi All
Here is my prob
I want to trap the array of data - it's condition. Then I want add it to List1.
However I get an error. >> Subscript out of range <<. What it's wrong?
my code:
thanks in advanceCode:Option Explicit Private Sub Command1_Click() Dim IntCounter As Integer Dim strData() As String For IntCounter = 0 To 4 If txtDana(IntCounter).Text <> "" Then strData(IntCounter) = lblZwierzaki(IntCounter).Caption ' <<< here I get this error List1.AddItem strData(IntCounter) ' it was: List1.AddItem Sztuki(IntCounter) End If ' I correct already this now Next End Sub




Reply With Quote