delphidestructor
Programmer
- Oct 20, 2000
- 67
I’m reading a simple text file and parsing the lines into an Excel 2000 worksheet. I’m using VBA (obviously) and the InStr function to return the positions for the Mid function.
I have tried both of these and other variations of, to return the substring of number characters after the “$”.
Mid(tmpstr, InStr(tmpstr, "$"
+ 1, InStr(tmpstr, Chr(32)) - 1)
Mid(tmpstr, InStr(tmpstr, "$"
+ 1, InStr(tmpstr, “ “) - 1)
An example string:
20701$28623 S 0.23 ----- 0.0387
^
The only chr 32 is here all the others are tabs chr 9
The InStr function will not find the position of the space char. Any suggestions or help would be great. Thanks.
Mike
I have tried both of these and other variations of, to return the substring of number characters after the “$”.
Mid(tmpstr, InStr(tmpstr, "$"
Mid(tmpstr, InStr(tmpstr, "$"
An example string:
20701$28623 S 0.23 ----- 0.0387
^
The only chr 32 is here all the others are tabs chr 9
The InStr function will not find the position of the space char. Any suggestions or help would be great. Thanks.
Mike