strData() cannot be used without a Redim as mentioned in post#2.
However, you don't need strData() to add those captions into Listbox.
Code:Option Explicit Private Sub Command1_Click() Dim IntCounter As Integer For IntCounter = 0 To 4 If txtDana(IntCounter).Text <> "" Then List1.AddItem lblZwierzaki(IntCounter).Caption End If Next End Sub




Reply With Quote