23. Write a VB program to accept the number from the user in text box and display multiplication table of that number into the list box.


Private Sub cmdClear_Click()
Text1.Text = “”
List1.Clear
Text1.SetFocus
End Sub

Private Sub cmdDisplay_Click()
Dim n, i As Integer
n = Val(Text1.Text)
For i = 1 To 10
List1.AddItem n * i
Next
End Sub

Private Sub cmdExit_Click()
Unload Me
End Sub

Private Sub Form_Load()
List1.Clear
End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s