Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I make the find reverse method to continue moving?
    primarykey
    data
    text
    <p>I am currently able to search through some text and find the first matching string. This moves from left to right, and each time "btnFindNext" is clicked, the next matching string is selected. </p> <p>However, I now want to make it possible so that the search moves from right to left. I am using the RichTextBoxFind.Reverse method, and indeed this selects the first matching string from the right. However, when the user clicks "btnFindNext" again, the next matching string is not selected. Any ideas why?</p> <p>Edit: I've added the code I am currently using to select from left to right.</p> <p>The user first presses 'Find' and this is the code.</p> <pre><code> startFrom = RichTextBox.Find(textToFind.Text, RichTextBox.SelectionStart, RichTextBoxFinds.None) If lastposition &lt;&gt; -1 Then RichTextBox.SelectionStart = startFrom RichTextBox.SelectionLength = textToFind.Text.Length startFrom = startFrom + 1 Else MsgBox(cboFFindWhat.Text &amp; " Not Found") End If </code></pre> <p>The user then presses 'FindNext'. This is the code for that.</p> <pre><code>startFrom = RichTextBox.Find(textToFind.Text, startFrom, RichTextBoxFinds.None) If startFrom &lt;&gt; -1 Then RichTextBox.SelectionStart = startFrom RichTextBox.SelectionLength = textToFind.text.length startFrom = startFrom + 1 Else MsgBox(textToFind.Text &amp; " Not Found") End If </code></pre> <p>The above 2 sections of code work perfectly for searching down a document. I now want to make it possible so that the user can search upwards. How is this achieved? Any help would be much appreciated. Thank you in advance!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload