September 03, 202200:31:43

Lesson 50 Excel Vba ingress Progressive value

Private Sub CommandButton1_Click()
Dim a, b, c, d, e, f, g, h, i As Long
ListBox1.Clear
Frame1.Visible = True
Label1.Width = 1
i = Sheet1.Range("A100000").End(xlUp).Row
f = Len(TextBox1.Text)



If TextBox1.Text = "" Then

else

For a = 1 To i
If StrConv(TextBox1.Text, vbProperCase) = StrConv(Left(Sheet1.Cells(a, 1), f), vbProperCase) Then
ListBox1.AddItem Sheet1.Cells(a, 1)
End If
VBA.DoEvents

If b = i / 250 Then
If Label1.Width = 250 Then
Label1.Width = 1
Else
Label1.Width = Label1.Width + 1
End If
b = 1
Else

b = b + 1
End If

Label2.Caption = "TOTAL ITEM " & i

Label3.Caption = "SERCH ITEM " & a

Label4.Caption = "FOUND OTEM " & ListBox1.ListCount

Label5.Caption = Round(a / (i / 100), 2) & "%"


VBA.DoEvents
Next a




End If



Frame1.Visible = False


End Sub

Private Sub Label5_Click()

End Sub

Private Sub UserForm_Click()

End Sub

Private Sub UserForm_Initialize()
Frame1.Visible = False
End Sub