Get last 5 characters in a string
Error check:
result = str.Substring(Math.Max(0, str.Length - 5))
str.Substring(str.Length - 5)
Checks for errors:
Dim result As String = str
If str.Length > 5 Then
result = str.Substring(str.Length - 5)
End If