R
r
sorry, must control the length
Function Mid2( _
sString As String, _
lStart As Long, _
Optional lLength As Long) As String
If Len(sString) < lStart + 1 Then
Mid2 = Right(sString, Len(sString) + 1 - lStart)
If lLength > Len(Mid2) Then
Mid2 = Left(Mid2, lLength)
End If
End If
End Function
regards
r
Function Mid2( _
sString As String, _
lStart As Long, _
Optional lLength As Long) As String
If Len(sString) < lStart + 1 Then
Mid2 = Right(sString, Len(sString) + 1 - lStart)
If lLength > Len(Mid2) Then
Mid2 = Left(Mid2, lLength)
End If
End If
End Function
regards
r