String Length Function

A

AJOLSON

I am trying to write a function that will return the leangh of a Feild. I
cant get it to do it. here is what I have any help would be great. I tried
Instr but that only returns to the charater I identify.

Function CountStr(Strin) As Integer

Dim IntTemp As String

IntTemp = Length(Strin)
CountStr = IntTemp

End Function
 
D

Dirk Goldgar

AJOLSON said:
I am trying to write a function that will return the leangh of a Feild. I
cant get it to do it. here is what I have any help would be great. I
tried
Instr but that only returns to the charater I identify.

Function CountStr(Strin) As Integer

Dim IntTemp As String

IntTemp = Length(Strin)
CountStr = IntTemp

End Function


There's a built-in function Len() that returns the length of a string.
Check it out in the online help.
 
Top