I have a string with a number that can be 1 or 2 digits and a colon, then a space and then a name string. For example:
14: John Smith
How would I strip out the number and the colon (and space after the colon), just leaving the name? I’m wanting to compare this string with another existing string.
Ok, I added the lines to my CellBackgroundPaint of my listbox:
if row < me.ListCount then
nam = me.cell(row,0)
nam2 = Mid(nam, Instr(nam, ": ") + 2)
If nam2 = ydna(primary)) then
g.ForeColor = &c324F17
g.FillRect(0, 0, g.Width, g.Height)
end if
end if
I strip out the number and colon and then compare the string to light the appropriate listbox cell green. But i’m getting an error on the 4th line: “The keyword ‘then’ is expected after this if statements condition.” But there is a ‘then’ there already? Weird.