Q: Using INSTR with a string
David Sullivan; email@example.com wrote: I want to pull out some text from an ASCII text and put it into a field in a database. EX: Ticket No.: 543786
It's the number I want to pull out, so I want to use InStr( ) to get me past the "Ticket No." and then pull out the number immediately after that. But I reallly can't see how to do that with InStr( ).
A: You can check for the ":": Dim p Dim strText as String strText$ = "Ticket No.: 543786" p = Instr(strText,":") MsgBox Right$(strText$,Len(strText$)-p) This will give you the number... Return