Function IsPalindrome(str)
Dim iStart,iEnd,ctr,blnPalin str=trim(str)
blnPalin=true iEnd=len(str) iCnt=round(iEnd / 2) iStart=1
for ctr=1 to cint(iCnt)
if(mid(str,iEnd,1)<>mid(str,iStart,1))then
IsPalindrome=false
Exit Function end if iStart=cint(iStart)+1 iEnd=cint(iEnd)-1 next if(blnPalin=true)then IsPalindrome=true else IsPalindrome=false end if
End Function
Sub blankStr() str=text1.value if(trim(str)="")
then
msgbox "Please enter a number"
exit sub end if
if(IsPalindrome(str))then msgbox "Yes"
else
msgbox "No"
end if
End Sub