Skip to main content

Write a VB Program to accept a number from user and check whether it is palindrome or not (Accept number using input box ) and display result using message box.

· One min read
Kaustubh Kulkarni
Private Sub Command1_Click()  

Dim no As Integer
Dim no2 As Integer
Dim sum As Integer
no = Val(Text1.Text)
no2 = no
While no
r = no Mod 10
sum = sum * 10 + r
no = no 10
If no2 = sum Then
MsgBox ("Number is palindrome")
MsgBox ("Number is not palindrome")
End If

End Sub