Using Win32 API functions on VB6/VBA, I would like to create a SUB procedure like the following:
Call SelColor(Lview, Row, Col, Start, Len, Color)
Where Lview is the target control (in this case a Listview), Row and Col are the coordinates to find the target text, and Start, Length and Color are the parameters to set the color to the selected the text.
I know that this can be easily done in a Richtextbox using the following code:
RTB.SelStart = 2 ' Starts selection at character 2
RTB.SelLength = 3 ' Selecting 3 characters
RTB.SelColor = blue ' Setting blue color for selection
However, I have not been able to find a direct way to do it on multirow controls like Listbox, Combobox, ListView, Flexgrid, and so on.
Can you please provide some guidance on API functions to achieve the intended job?
Thanks!!!