Line by line:
Code:
'In this part we declare all of our variables
Dim intPosition As Integer
Dim strText As String
Dim strResult As String
'We store the text that the user inputted in a variable
strText = txtInput.Text
'This loop tells VB to perform the loop as
'long as the position is in the bounds of the string.
While intPosition =< Len(strText)
'Increase the position by one
intPosition = intPosition + 1
'Put the current letter at the BEGINNING of
'the resulting string.
strResult = Mid(strText, intPosition, 1) & strResult
'End the loop
Wend
'If the result (the reversed text) is the same as the source, then it is a palindrome
If strResult = strText Then
MsgBox "The string is a palindrome!"
End If
About the form:
Click on File > New Project > Standard EXE Project.
A form will automatically be created.
Put a TextBox on the form and name it txtInput.
Put a CommandButton on the form and name it cmdCheck.
Double-click on the button and you will be taken to the cmdCheck_Click() event.
Put the above code in this procedure.
Good luck!