Hey again,
I have a string, and i want to chop the last two letters off the end, so is there a right() function? I cant remember, or do i use mid() or left()? if so, gimme an example pls.
Printable View
Hey again,
I have a string, and i want to chop the last two letters off the end, so is there a right() function? I cant remember, or do i use mid() or left()? if so, gimme an example pls.
hi there...
string1 = mid(string1,1,len(string1)-2)
Code:Dim A As String
Dim B As String
A = "Hello World!!"
B = Left$(A, Len(A)-2)
thanks, long time since i did nething with strings in vb, so tell me one more thing, how do i get the last two letters?
Code:Dim A As String
Dim B As String
A = "Hello World!!"
B = Right$(A, 2)
c'mon man...
string1 = mid(string1,len(string1)-2,2)
with a lead in the right direction of someone saying use mid, wouldnt be that hard to look it up in msdn to see how to utilize it. Sometimes is quicker than posting something.
Thanks to *Vince, gfk and billrogers. My head just isn't screwed on today, that is the trouble with having a free internet connection, you can just ask ppl, instead of using your head, thanks guys, but i really should get out of this habit!
My MSDN doesnt work, it crashes everytime i try and view it under win98, hh.exe is what it crashes in. Works fine under NT tho
[Edited by Mag-Net on 07-28-2000 at 11:43 AM]
Just a little word of advice...
" Asking is good and helpfull but remembering is better and usefull !!! "
see you next time Mag-Net...