|
-
Jul 28th, 2000, 10:05 AM
#1
Thread Starter
Lively Member
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.
Mag-Net's Home
Visual Studio 6-Enterprise - SP4
ICQ: 35519773
Have Fun 
-
Jul 28th, 2000, 10:09 AM
#2
Addicted Member
hi there...
string1 = mid(string1,1,len(string1)-2)
-
Jul 28th, 2000, 10:22 AM
#3
Addicted Member
Another example
Code:
Dim A As String
Dim B As String
A = "Hello World!!"
B = Left$(A, Len(A)-2)
Visual Basic 6 Enterprise Edition + SP4
-
Jul 28th, 2000, 10:28 AM
#4
Thread Starter
Lively Member
another Q
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?
Mag-Net's Home
Visual Studio 6-Enterprise - SP4
ICQ: 35519773
Have Fun 
-
Jul 28th, 2000, 10:30 AM
#5
Addicted Member
Code:
Dim A As String
Dim B As String
A = "Hello World!!"
B = Right$(A, 2)
Visual Basic 6 Enterprise Edition + SP4
-
Jul 28th, 2000, 10:31 AM
#6
Addicted Member
c'mon man...
string1 = mid(string1,len(string1)-2,2)
-
Jul 28th, 2000, 10:38 AM
#7
Hyperactive Member
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.
-
Jul 28th, 2000, 10:38 AM
#8
Thread Starter
Lively Member
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]
Mag-Net's Home
Visual Studio 6-Enterprise - SP4
ICQ: 35519773
Have Fun 
-
Jul 28th, 2000, 10:42 AM
#9
Addicted Member
Just a little word of advice...
" Asking is good and helpfull but remembering is better and usefull !!! "
see you next time Mag-Net...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|