hi
I try populate the data in multiple textboxes based on condition.
may be explenation is difficult but I attach picture inside sheet and fill manually how the data should show when run the userform . it should show all of data contain minus values for all of textboxes . each three textboxes contain data columns A,B,C . just see the picture will understand what I want
Private Sub UserForm_Initialize()
Dim lr, x
lr = Sheets("DATA").Range("A" & Rows.Count).End(3).Row
With Sheets("DATA")
For x = 2 To lr
If .Cells(x, 3).Value < 0 Then
For i = 1 To 3
Me.Controls("textbox" & i).Value = Array(.Cells(x, 1), .Cells(x, 2), .Cells(x, 3))
Next
End If
Next
End With
End Sub