How to get the length of string?
for egzample i have "WholyGvakamoly"
and i need to get number 14 (the length)
Printable View
How to get the length of string?
for egzample i have "WholyGvakamoly"
and i need to get number 14 (the length)
Use Len(string)
It will return the length of a string.
Well i tried that before
and VB says "indentifier expected" or something like that
could anyone please write the sample code
did you miss off a " ?
msgbox len("WholyGvakamoly")
works
as does
dim strTemp as string
stremp = "WholyGvakamoly"
msgbox len(strtemp)
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
Hi,casparas!
Put command button and Text box on your form:
Private Sub Command1_Click()
Dim YourString As String
Dim LengthOfYourString As Integer
YourString = "WholyGvakamoly"
LengthOfYourString = Len(YourString)
Text1 = LengthOfYourString
End Sub
After you click the button,you'll see in text box - 14
Good luck.
Larisa
Thank you very much that's exactly what i needed
-Casparas