I have some code that works but there is a section of it that I don't quite understand. I have commented what I don't understand. In this string example you are only to put three characters in the text box.
Private Sub cmdCode_click()
Dim strInput As String, strA As String, strB As String, strC As String, strD As String, int1 As Integer, int2 As Integer
strInput = txtInput.Value
strA = Left(strInput, 1) 'Get first character of the string to the left
int1 = Len(strInput) 'measure the length of the string
int2 = int1 - 1 'subtract 1 from int1 which leaves you with 2 characters? Is this correct?
strB = Mid(strInput, 2, 1) 'I don't know what is going on here. Is this saying select first character from the left?
strC = Right(strInput, 1) 'get last character on string to the right
strD = Asc(strA) & "," & Asc(strB) & "," & Asc(strC) 'assign ASCII values to characters
lblOutPut.Caption = strD 'display output
Is there a better way / shorter way to write this code?