Hi all,
The following program shows as error on invalid property value. i tried out but cant find the exact error in that. I have to search the value in column x and have to display the value with that column R in the listbox.
Code
Private Sub textbox1_Change()
Dim i As Long
Dim a As Integer
Me.TextBox1.Text = StrConv(Me.TextBox1.Text, vbProperCase)
Me.ListBox1.Clear
For i = 2 To Application.WorksheetFunction.CountA(Sheet2.range("X:X"))
a = Len(Me.TextBox1.Text)
If Left(Sheet2.Cells(i, 24).value, a) = Left(Me.TextBox1.Text, a) Then
Me.ListBox1.AddItem Sheet2.Cells(i, 24).value
Me.ListBox1.List(ListBox1.ListCount - 1, 24) = Sheet2.Cells(i, 18).value
End If
Next i
End Sub
Display More