Keep getting an error trying to replace part of a string in a msflexgrid:
The code that does not work:
TextToReplace = "price adjusted for sales commission (.911)"
For r = 1 To GridMisc.Rows - 1
With Me.GridMisc
If InStr(LCase(.TextMatrix(r, 2)), TextToReplace) Then
.TextMatrix(r, 2) = .TextMatrix(r, 2) & Replace(TextToReplace, "")
End If
End With
Next
Typical string in grid:
Software sold RoofCalculator 8.3 Michael C Douglass price adjusted for sales commission (.911)
just trying to erase all after the name