I have a text box where the user picks a number between 2 and 12, They click a button and then a list of multiplication tables appear related to the number they choose, e.g. pick number 2 and a list of tables from 2*2 up to 2*12 appear like this:
2*2 = 4
2*3 = 6
2*4 = 8
And so on....
I was going to do it like this:
But it seems wrong; there must be a simpler way?
Thanks.
2*2 = 4
2*3 = 6
2*4 = 8
And so on....
I was going to do it like this:
Code:
Dim array_table(2 To 12) As String
Dim var_num As Integer
array_table(2) = "2*2 = 4 2*3 = 6..."
array_table(3) = "3*2 = 6..."
var_num = Val(txt_tbl)
lbl_tables.Caption = array_table(var_num)
But it seems wrong; there must be a simpler way?
Thanks.