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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top