Text1.text is the string being searched and chr(10) is the string being searched. We take a new variable called pos, which signifies the starting postion for the search in the given string (i.e. text1.text). The SendMessage API function requires the window handle (hWnd& above) of the text box. To get the window handle of the text box, use the hWnd property of the text box. Initially pos is set as the current caret location, which is given by text1.selstart Pos is taken since when we find a new line char, its obvious that we will look for a new line char above of it.
found = InStrRev(Text1.Text, Chr(10), pos, 0)