Private Sub Command1_Click()
Dim thestring As String thestring = "hello" MsgBox Length(thestring) End Sub Public Function Length(thestring As String) As Double Dim y As Double y = 1E+30 Do y = y - 1 Loop While y <> Len(thestring) Length = y End Function |