[vb6] trimming from beginning..
ok, so im recieving a packet, and all I want to do is trim the first 4 bytes off of the beginning, and have the remainder, anybody know how to do this?
btw, $right(string, len(string)-4) doesn't work, it just gives me a byref mismatch error because its hex, I guess.
Re: [vb6] trimming from beginning..
The Right function shouldn't give that error, and it doesn't matter what the string contains.
vb Code:
str = Right$(str, Len(str) - 4)
'you can also use the Mid$ function:
str = Mid$(str, 5)
Re: [vb6] trimming from beginning..
ok, the mid worked perfect (except to take off 4 characters i needed to enter 7, lol), thanks alot.
Re: [vb6] trimming from beginning..
If you enter 7 it will remove 6 characters and not 4... But I'm glad you've got it working.