Philippe Slot
New member
- Joined
- Aug 9, 2014
- Messages
- 1
- Programming Experience
- Beginner
So I passed my year by slimmest of chances, so that's why I got an exercise for the vacation.
I can't just jump in, and do the task, so that's why I'm redoing my whole education book again.
But I'm having trouble with one exercise and was hoping someone could help me, so I can study for my REAL task.
so it's exercise 9 I'm having trouble with, The description might be dutch, but it's not hard to tell what I have to do.
so when I select a number from the listbox, the label should appear multiple times and the number selected gets multiplied by 1 through 10
here is my code, hopefully you can understand and help
http://prntscr.com/4b57bi
I can't just jump in, and do the task, so that's why I'm redoing my whole education book again.
But I'm having trouble with one exercise and was hoping someone could help me, so I can study for my REAL task.
so it's exercise 9 I'm having trouble with, The description might be dutch, but it's not hard to tell what I have to do.
so when I select a number from the listbox, the label should appear multiple times and the number selected gets multiplied by 1 through 10
here is my code, hopefully you can understand and help
Private Sub frmTafels_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim intteller As Integer For intteller = 0 To 10 lstBox.Items.Add(intteller) Next End Sub Private Sub lstBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstBox.SelectedIndexChanged Dim intteller, intgetal, intUitkomst As Integer Dim strTeller As String For intteller = 1 To 10 Step 1 strTeller += intteller intgetal = lstBox.SelectedItem.ToString intUitkomst = intteller * intgetal Next lblTafels.Text = (intteller.ToString & " x " & intgetal.ToString & " = " & intUitkomst.ToString) End Sub
http://prntscr.com/4b57bi
Last edited by a moderator: