ANWAR ALAM
New Member
- Joined
- Mar 26, 2021
- Messages
- 18
- Office Version
- 2010
- Platform
- Windows
Hi to all, I have a problem while using inkEdit control, taken on Sheet1/ Excel 2010. I have say 6 lines of data in it. In each line, I have written some item names, randomly. I have also taken a ComboBox on Sheet1. When I type say, “W”, in ComboBox, it is searched in inkEdit, according to the following piece of VBA code:
Private Sub ComboBox1_Change()
Dim Start: Start = InStr(Me.InkEdit1.Text, ComboBox1.Text)
InkEdit1.SelStart = Start - 1
InkEdit1.SelLength = Len (ComboBox1.Text)
InkEdit1.SelColor = RGB(255, 0, 0)
End Sub
Suppose the name in the 1st line contains “W”, so after searching, its color is changed to RED. Please see the Image, i have sent in attachment.
But I want that the next five lines should also be searched so that all the “Ws” are changed to RED, if they are present in the next lines too. will be grateful for any possible solution to this. Thanks. Regards!
Private Sub ComboBox1_Change()
Dim Start: Start = InStr(Me.InkEdit1.Text, ComboBox1.Text)
InkEdit1.SelStart = Start - 1
InkEdit1.SelLength = Len (ComboBox1.Text)
InkEdit1.SelColor = RGB(255, 0, 0)
End Sub
Suppose the name in the 1st line contains “W”, so after searching, its color is changed to RED. Please see the Image, i have sent in attachment.
But I want that the next five lines should also be searched so that all the “Ws” are changed to RED, if they are present in the next lines too. will be grateful for any possible solution to this. Thanks. Regards!