Finding a string length : len « String Functions « VBA / Excel / Access / Word






Finding a string length

 
Sub GetLength()
    Dim MyString As String
    Dim StringLength As Integer
    MyString = "Hello World"
    StringLength = Len(MyString)
    MsgBox StringLength
End Sub

 








Related examples in the same category

1.Using Len(string) to Check the Length of a String
2.Get the length of a String