Guest User

Untitled

a guest
Jan 19th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Public Class Form1
  2.  
  3. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  4. Dim a, b, c As Integer
  5. a = InputBox("Hur många nummer vill du entrera?")
  6. For i = 1 To a
  7. b = InputBox("Skriv in ett tal")
  8. ListBox1.Items.Add(b)
  9. If b < 0 Then
  10. ListBox1.Sorted = True
  11. MsgBox(ListBox1.SelectedItem(0) & "," & ListBox1.SelectedItem(a))
  12. Else
  13.  
  14. End If
  15.  
  16. Next
  17. c = a
  18. MsgBox(ListBox1.SelectedItem(0) & "," & ListBox1.SelectedItem(a))
  19.  
  20. End Sub
Add Comment
Please, Sign In to add comment