|
-
Oct 19th, 2005, 08:07 AM
#1
Thread Starter
New Member
[RESOLVED] error in len(...)
hey somhow i cant take away inside len(..)
for example i want to get a string of text "hello lol"
say i want to get the lol from the "hello lol"
i tried right("hello lol", len("hello lol" - 6)) but that didnt work
how can i get this working thanks ^_^
-
Oct 19th, 2005, 08:17 AM
#2
Re: error in len(...)
msgbox Right("Hello lol",3)
or
msgbox Right("Hello lol",Len("Hello lol")-6)
or
str = "Hello lol"
msgbox Right(str,len(str)-6)
you have to have the -6 outside then len()
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Oct 19th, 2005, 08:23 AM
#3
Re: error in len(...)
Or
VB Code:
Private Sub Command1_Click()
Dim strString As String
Dim arrString() As String
strString = "Hello lol"
arrString = Split(strString, " ")
MsgBox arrString(1)
End Sub
-
Oct 19th, 2005, 09:22 AM
#4
KING BODWAD XXI
Re: error in len(...)
This probably isnt relevant but just in case
Split isnt in VB5 its only in VB6
-
Oct 19th, 2005, 11:56 AM
#5
Thread Starter
New Member
Re: error in len(...)
thanks for the replys guys 
the hello lol was just an example really, in the program strings are of different length.
Right(bla, Len(bla) - 6) worked fine thanks alot
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
|