Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim a, b, c As Integer
Label2.Text = ""
Try
a = TextBox1.Text
Label3.Text = "Tabuada do número " + a.ToString() + " !"
Label3.Visible = True
For b = 1 To 10
c = a * b
Label2.Text += a.ToString() + " X " + b.ToString() + " = " + c.ToString() + Environment.NewLine
Next
Catch ex As Exception
TextBox1.Text = ""
MessageBox.Show("Por favor, Digite apenas números!")
End Try
End Sub
End Class
Feito no Visual Studio 2011 | Executável |