Hi,
This forum is for Vb.Net questions only.
It looks to me like you are using VB6 or an earlier version as you are using
MID directly in the above code.
If you are using VB1, VB2, VB3, VB4, VB5 or VB6 then please use this forum instead.>>
http://www.programmersheaven.com/mb/VBasic/Board.aspxRegards,
John