hi
I face problem when write the letters based on COL A the second letter always write small letter .
what I want when search data like AA then should show only data for relating of AA and when writing capital letter not convert to small.
this is the code
any suggestion to fix it ,please?
I face problem when write the letters based on COL A the second letter always write small letter .
what I want when search data like AA then should show only data for relating of AA and when writing capital letter not convert to small.
this is the code
VBA Code:
Private Sub TextBox1_Change()
Me.TextBox1 = StrConv(Me.TextBox1.Text, vbProperCase)
Me.ListBox1.Clear
ListBox1.ColumnCount = 5
For i = 2 To Application.WorksheetFunction.CountA(sheet1.Range("A:A"))
a = Len(Me.TextBox1.Text)
If LCase(Left(sheet1.Cells(i, 1).Value, a)) = LCase(Left(Me.TextBox1.Text, a)) Then
Me.ListBox1.AddItem sheet1.Cells(i, "A").Value
Me.ListBox1.List(ListBox1.ListCount - 1, 1) = sheet1.Cells(i, "B").Value
Me.ListBox1.List(ListBox1.ListCount - 1, 2) = sheet1.Cells(i, "C").Value
Me.ListBox1.List(ListBox1.ListCount - 1, 3) = sheet1.Cells(i, "D").Value
Me.ListBox1.List(ListBox1.ListCount - 1, 4) = sheet1.Cells(i, "E").Value
End If
Next
End Sub
any suggestion to fix it ,please?