Generates a string of characters that fall between the two specified characters.
Generates a string of characters that fall between the two specified characters.
Rate Generates a string of characters that fall between the two specified characters.
(1(1 Vote))
Dim n As Byte, FromCode As Byte, ToCode As Byte
'ensure we only extract one character from the strings
FromChar = Left(FromChar, 1): ToChar = Left(ToChar, 1)
'get the character codes for the characters
'(we use the codes for the 'For' loop range values)
FromCode = Asc(FromChar): ToCode = Asc(ToChar)
'swap the values if needed
If ToCode < FromCode Then
n = ToCode
ToCode = FromCode
FromCode = n
End If
'generate the string
For n = FromCode To ToCode
SequentialStr = SequentialStr & Chr(n)
Next n
End Function
Generates a string of characters that fall between the two specified characters. Comments
No comments yet — be the first to post one!
Post a Comment