I am trying to figure out why this code
will not step through and find text if settingQ is not zero
sorry if this is kinda sloppy to read
will not step through and find text if settingQ is not zero
Code:
Public Sub prevFindTextInstrQ(strToFindQ As String, settingsQ As Long)
Dim entireStrQ As String
's_startQ is public declare long
'setting options for reverse find
'allmatches = 0
'rtfWholeWord = 2
'rtfMatchCase = 4
'rtfWholeWord & rtfMatchCase = 6
entireStrQ = callingRichText.Text
s_startQ = s_startQ - Len(strToFindQ)
If s_startQ <= 0 Then
s_startQ = -1
Else
End If
s_startQ = InStrRev(entireStrQ, strToFindQ, s_startQ, vbTextCompare)
s_startQ = s_startQ - Len(strToFindQ)
If s_startQ <= -1 Then
s_startQ = 0
Else
End If
s_startQ = callingRichText.Find(strToFindQ, s_startQ, , settingsQ)
If s_startQ = -1 Then 'allows user to loop back
s_startQ = InStrRev(entireStrQ, strToFindQ, s_startQ, vbTextCompare)
s_startQ = s_startQ - Len(strToFindQ)
If s_startQ <= -1 Then
s_startQ = 0
Else
End If
s_startQ = callingRichText.Find(strToFindQ, s_startQ, , settingsQ)
Else
End If
End Sub
sorry if this is kinda sloppy to read